Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | List of all members
itasca::ICIterator< T > Class Template Reference

Const iterator for an IContainer. More...

#include <icontainer.h>

Inheritance diagram for itasca::ICIterator< T >:
itasca::IIterator< T >

Public Member Functions

 ICIterator (const IContainer *c)
 
 ~ICIterator ()
 Destructor for the const iterator.
 
void setContainer (const IContainer *c)
 Associate this with a different container.
 
const IContainer * getContainer () const
 Get the IContainer pointer that this iterator is associated with.
 
bool atEnd () const
 Returns true if at the end of the IContainer.
 
const ICIterator< T > & operator++ ()
 Increment the const iterator to the next entry in the IContainer.
 
const T * get () const
 Return a const pointer to T.
 
const T * operator-> () const
 Return a const pointer to T.
 
const T & operator* () const
 Return a const reference to T.
 
 operator const T * () const
 Return a const pointer to T.
 
void copy (const ICIterator< T > &c)
 Copy another iterator.
 

Detailed Description

template<class T>
class itasca::ICIterator< T >

Const iterator for an IContainer.

A const iterator for generically iterating through an IContainer. This should not be used in time sensitive operations.

Constructor & Destructor Documentation

◆ ICIterator()

template<class T >
itasca::ICIterator< T >::ICIterator ( const IContainer * c)
inline

Constructor for the const iterator.

Parameters
cPointer to the IContainer.

Member Function Documentation

◆ get()

template<class T >
const T * itasca::ICIterator< T >::get ( ) const
inline

Return a const pointer to T.

Increment the iterator by the specified amount. The implementation runs through a linked list rather than doing math. subtract position of earlier iterator from position of this iterator to return the difference as a number; there's no error check to see if earlier iterator is really earlier than later iterator, and it's implemented by running through a linked list


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