CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoType::CList< T >::TIter Class Reference

#include <cartotype_list.h>

Public Member Functions

 TIter (CListBase &aList, TListLink *aLink)
 
 operator T* ()
 
void Next ()
 
void Prev ()
 
TLink * Cur ()
 
void MoveCurrentToStart ()
 
TResult Insert (const T &aT)
 
void MoveToCurrentPosition (TListLink *aLink)
 
bool AtStart () const
 

Detailed Description

template<class T>
class CartoType::CList< T >::TIter

A non-constant iterator for traversing lists. The iterator's 'operator TYPE*' function returns a pointer to the iterator's current element, or null if the list is empty or the iterator has reached the end or start of the list.

Constructor & Destructor Documentation

◆ TIter()

template<class T >
CartoType::CList< T >::TIter::TIter ( CListBase aList,
TListLink aLink 
)
inline

Creates an iterator referring to the link aLink. If aLink is null, the iterator is a null iterator and cannot be incremented or decremented.

Member Function Documentation

◆ AtStart()

template<class T >
bool CartoType::CList< T >::TIter::AtStart ( ) const
inline

Returns true if this iterator is at the start of the list.

◆ Cur()

template<class T >
TLink * CartoType::CList< T >::TIter::Cur ( )
inline

Returns a pointer to the current link.

◆ Insert()

template<class T >
TResult CartoType::CList< T >::TIter::Insert ( const T &  aT)
inline

Inserts the item aT before the current item.

◆ MoveCurrentToStart()

template<class T >
void CartoType::CList< T >::TIter::MoveCurrentToStart ( )
inline

Moves the current item to the start of the list.

◆ MoveToCurrentPosition()

template<class T >
void CartoType::CList< T >::TIter::MoveToCurrentPosition ( TListLink aLink)
inline

Moves the link aLink to the current position.

◆ Next()

template<class T >
void CartoType::CList< T >::TIter::Next ( )
inline

Moves to the next item. The iterator becomes a null iterator if there are no more items.

◆ operator T*()

template<class T >
CartoType::CList< T >::TIter::operator T* ( )
inline

Returns a pointer to the current item, or null if this is a null iterator.

◆ Prev()

template<class T >
void CartoType::CList< T >::TIter::Prev ( )
inline

Moves to the previous item. The iterator becomes a null iterator if there are no more items.


The documentation for this class was generated from the following file: