libFAUDES

Sections

Index

faudes::TBaseSet< T, Cmp >::Iterator Class Reference

#include <baseset.h>

List of all members.


Detailed Description

template<class T, class Cmp = std::less<T>>
class faudes::TBaseSet< T, Cmp >::Iterator

Iterator class for high-level api to TBaseSet.

This class is derived from STL interators to additionally provide a reference of the container to iterate on. This feature is used to adjust iterators when the actual set gets reallocated due to a Detach() operation. Inheritance is private to ensure that all high-level api functions maintain iteretor refernces consistently. Currently, high-level api iterators support the operators -> ,*, =, ++, --, ==, !=.

HotFix: turned to public inheritance to compile with stl/g++ 4.3. Should investigate this in detail and explicitly make the required data public while having inheritance private in general.

Public Member Functions

 Iterator ()
 Default contructor, container unknown.
 Iterator (const TBaseSet< T, Cmp > *pBaseSet, const typename std::set< T, Cmp >::const_iterator &sit)
 Construct by members, used by TBaseSet to create temporary iterators.
 Iterator (const Iterator &fit)
 Copy constructor, copies container reference, incl attach.
 ~Iterator (void)
 Destructor.
const Iteratoroperator= (const Iterator &rSrc)
 Assigment, tracks container.
void StlIterator (const typename std::set< T, Cmp >::const_iterator &sit)
 Assign STL iterator only.
const std::set< T, Cmp >
::const_iterator
StlIterator (void) const
 Get STL iterator only.
void Invalidate (void)
 Invalidate.
void Detach (void)
 Detach.
void DValid (void) const
 Check validity (provoke abort error).
const T * operator-> (void) const
 Reimplement dereference.
const T & operator* (void) const
 Reimplement derefernce.
bool operator== (const Iterator &rOther) const
 Reimplement ==.
bool operator!= (const Iterator &rOther) const
 Reimplement !=.
Iterator operator++ (int step)
 Reimplement postfix ++.
const Iteratoroperator++ (void)
 Reimplement prefix ++.
Iterator operator-- (int step)
 Reimplement postfix --.
const Iteratoroperator-- (void)
 Reimplement prefix --.

Public Attributes

const TBaseSet< T, Cmp > * pBaseSet
 Order by reference for containers of Iterators <.
bool mAttached
 Indocate that this iterator is attached to some baseset.


Constructor & Destructor Documentation

template<class T, class Cmp = std::less<T>>
faudes::TBaseSet< T, Cmp >::Iterator::Iterator (  )  [inline]

Default contructor, container unknown.

template<class T, class Cmp = std::less<T>>
faudes::TBaseSet< T, Cmp >::Iterator::Iterator ( const TBaseSet< T, Cmp > *  pBaseSet,
const typename std::set< T, Cmp >::const_iterator sit 
) [inline]

Construct by members, used by TBaseSet to create temporary iterators.

template<class T, class Cmp = std::less<T>>
faudes::TBaseSet< T, Cmp >::Iterator::Iterator ( const Iterator fit  )  [inline]

Copy constructor, copies container reference, incl attach.

template<class T, class Cmp = std::less<T>>
faudes::TBaseSet< T, Cmp >::Iterator::~Iterator ( void   )  [inline]

Destructor.


Member Function Documentation

template<class T, class Cmp = std::less<T>>
const Iterator& faudes::TBaseSet< T, Cmp >::Iterator::operator= ( const Iterator rSrc  )  [inline]

Assigment, tracks container.

template<class T, class Cmp = std::less<T>>
void faudes::TBaseSet< T, Cmp >::Iterator::StlIterator ( const typename std::set< T, Cmp >::const_iterator sit  )  [inline]

Assign STL iterator only.

template<class T, class Cmp = std::less<T>>
const std::set<T,Cmp>::const_iterator& faudes::TBaseSet< T, Cmp >::Iterator::StlIterator ( void   )  const [inline]

Get STL iterator only.

template<class T, class Cmp = std::less<T>>
void faudes::TBaseSet< T, Cmp >::Iterator::Invalidate ( void   )  [inline]

Invalidate.

template<class T, class Cmp = std::less<T>>
void faudes::TBaseSet< T, Cmp >::Iterator::Detach ( void   )  [inline]

Detach.

template<class T, class Cmp = std::less<T>>
void faudes::TBaseSet< T, Cmp >::Iterator::DValid ( void   )  const [inline]

Check validity (provoke abort error).

template<class T, class Cmp = std::less<T>>
const T* faudes::TBaseSet< T, Cmp >::Iterator::operator-> ( void   )  const [inline]

Reimplement dereference.

template<class T, class Cmp = std::less<T>>
const T& faudes::TBaseSet< T, Cmp >::Iterator::operator* ( void   )  const [inline]

Reimplement derefernce.

template<class T, class Cmp = std::less<T>>
bool faudes::TBaseSet< T, Cmp >::Iterator::operator== ( const Iterator rOther  )  const [inline]

Reimplement ==.

template<class T, class Cmp = std::less<T>>
bool faudes::TBaseSet< T, Cmp >::Iterator::operator!= ( const Iterator rOther  )  const [inline]

Reimplement !=.

template<class T, class Cmp = std::less<T>>
Iterator faudes::TBaseSet< T, Cmp >::Iterator::operator++ ( int  step  )  [inline]

Reimplement postfix ++.

template<class T, class Cmp = std::less<T>>
const Iterator& faudes::TBaseSet< T, Cmp >::Iterator::operator++ ( void   )  [inline]

Reimplement prefix ++.

template<class T, class Cmp = std::less<T>>
Iterator faudes::TBaseSet< T, Cmp >::Iterator::operator-- ( int  step  )  [inline]

Reimplement postfix --.

template<class T, class Cmp = std::less<T>>
const Iterator& faudes::TBaseSet< T, Cmp >::Iterator::operator-- ( void   )  [inline]

Reimplement prefix --.


Member Data Documentation

template<class T, class Cmp = std::less<T>>
const TBaseSet<T,Cmp>* faudes::TBaseSet< T, Cmp >::Iterator::pBaseSet

Order by reference for containers of Iterators <.

Maintaine container reference

template<class T, class Cmp = std::less<T>>
bool faudes::TBaseSet< T, Cmp >::Iterator::mAttached

Indocate that this iterator is attached to some baseset.


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

libFAUDES 2.13a c++ source docu by doxygen 1.5.6