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 >::TConstIter Class Reference

#include <cartotype_list.h>

Public Member Functions

 TConstIter (const CListBase &aList, const TListLink *aLink)
 
 operator const T * () const
 
void Next ()
 
void Prev ()
 
bool AtStart () const
 

Detailed Description

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

A constant iterator for traversing lists of pointers. The iterator's 'operator const TYPE*' function returns a const 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

◆ TConstIter()

template<class T >
CartoType::CPointerList< T >::TConstIter::TConstIter ( const CListBase aList,
const TListLink aLink 
)
inline

Creates a constant 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 >::TConstIter::AtStart ( ) const
inline

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

◆ Next()

template<class T >
void CartoType::CPointerList< T >::TConstIter::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 >::TConstIter::operator const T * ( ) const
inline

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

◆ Prev()

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