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::CPointerList< T >::TIter Class Reference

#include <cartotype_list.h>

Public Member Functions

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

Detailed Description

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

A non-constant iterator for traversing lists of pointers. There are both const and non-const 'operator TYPE*' functions to return the iterator's current element. They return 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::CPointerList< 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::CPointerList< T >::TIter::AtStart ( ) const
inline

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

◆ Cur()

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

Returns a pointer to the current link.

◆ Insert()

template<class T >
TResult CartoType::CPointerList< T >::TIter::Insert ( T *  aPtr)
inline

Inserts the item aT before the current item.

◆ MoveCurrentToStart()

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

Moves the current item to the start of the list.

◆ MoveToCurrentPosition()

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

Moves the link aLink to the current position.

◆ Next()

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

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

◆ operator const T *()

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

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

◆ operator T*()

template<class T >
CartoType::CPointerList< 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::CPointerList< 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: