Ptex
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
PtexDict< T >::const_iterator Class Reference

Internal class used to provide iteration through the dictionary. More...

#include <PtexDict.h>

Public Member Functions

 const_iterator ()
 Default Constructor. More...
 
 const_iterator (const const_iterator &iter)
 Proper copy constructor implementation for const_iterator. More...
 
 const_iterator (const iterator &iter)
 Conversion constructor for iterator. More...
 
const_iteratoroperator= (const const_iterator &iter)
 Proper assignment operator for const_iterator. More...
 
const_iteratoroperator= (iterator &iter)
 Proper assignment operator for iterator. More...
 
const value_typeoperator* () const
 Operator for obtaining the value that the const_iterator references. More...
 
const value_typeoperator-> () const
 Pointer reference operator. More...
 
 operator bool ()
 For determining whether or not an iterator is valid. More...
 
bool operator== (const iterator &iter) const
 For comparing equality of iterators. More...
 
bool operator!= (const iterator &iter) const
 For comparing inequality of iterators. More...
 
bool operator== (const const_iterator &iter) const
 For comparing equality of const_iterators. More...
 
bool operator!= (const const_iterator &iter) const
 For comparing inequality of iterators. More...
 
const_iteratoroperator++ (int)
 For advancing the iterator to the next element. More...
 

Private Member Functions

 const_iterator (Entry **e, const PtexDict *d, int b)
 Constructor Helper for inline creation. More...
 
const value_typegetValue () const
 simple helper function for retrieving the value from the Entry More...
 

Private Attributes

const PtexDict_d
 dictionary back reference More...
 
Entry ** _e
 pointer to entry in table this iterator refs More...
 
int _b
 bucket number this references More...
 

Static Private Attributes

static value_type _defaultVal
 Default value. More...
 

Friends

class PtexDict
 
class iterator
 

Detailed Description

template<class T>
class PtexDict< T >::const_iterator

Internal class used to provide iteration through the dictionary.

This works on const data types, and provides const safe access. This class can also be created from a PtexDict::iterator class instance.

Author
longson
Version
1.2 longson 01/16/2002: Initial version based on iterator

Definition at line 377 of file PtexDict.h.

Constructor & Destructor Documentation

template<class T>
PtexDict< T >::const_iterator::const_iterator ( )
inline

Default Constructor.

Definition at line 380 of file PtexDict.h.

template<class T>
PtexDict< T >::const_iterator::const_iterator ( const const_iterator iter)
inline

Proper copy constructor implementation for const_iterator.

Definition at line 383 of file PtexDict.h.

template<class T>
PtexDict< T >::const_iterator::const_iterator ( const iterator iter)
inline

Conversion constructor for iterator.

Definition at line 386 of file PtexDict.h.

template<class T>
PtexDict< T >::const_iterator::const_iterator ( Entry **  e,
const PtexDict d,
int  b 
)
inlineprivate

Constructor Helper for inline creation.

Definition at line 421 of file PtexDict.h.

Member Function Documentation

template<class T>
const value_type& PtexDict< T >::const_iterator::getValue ( ) const
inlineprivate

simple helper function for retrieving the value from the Entry

Definition at line 424 of file PtexDict.h.

template<class T>
PtexDict< T >::const_iterator::operator bool ( )
inline

For determining whether or not an iterator is valid.

Definition at line 401 of file PtexDict.h.

template<class T>
bool PtexDict< T >::const_iterator::operator!= ( const iterator iter) const
inline

For comparing inequality of iterators.

Definition at line 407 of file PtexDict.h.

References PtexDict< T >::iterator::_e.

template<class T>
bool PtexDict< T >::const_iterator::operator!= ( const const_iterator iter) const
inline

For comparing inequality of iterators.

Definition at line 413 of file PtexDict.h.

References PtexDict< T >::const_iterator::_e.

template<class T>
const value_type& PtexDict< T >::const_iterator::operator* ( ) const
inline

Operator for obtaining the value that the const_iterator references.

Definition at line 396 of file PtexDict.h.

template<class T >
PtexDict< T >::const_iterator & PtexDict< T >::const_iterator::operator++ ( int  )

For advancing the iterator to the next element.

Definition at line 460 of file PtexDict.h.

template<class T>
const value_type* PtexDict< T >::const_iterator::operator-> ( ) const
inline

Pointer reference operator.

Definition at line 398 of file PtexDict.h.

template<class T>
const_iterator& PtexDict< T >::const_iterator::operator= ( const const_iterator iter)
inline

Proper assignment operator for const_iterator.

Definition at line 389 of file PtexDict.h.

References PtexDict< T >::const_iterator::_b, PtexDict< T >::const_iterator::_d, and PtexDict< T >::const_iterator::_e.

template<class T>
const_iterator& PtexDict< T >::const_iterator::operator= ( iterator iter)
inline

Proper assignment operator for iterator.

Definition at line 392 of file PtexDict.h.

References PtexDict< T >::iterator::_b, PtexDict< T >::iterator::_d, and PtexDict< T >::iterator::_e.

template<class T>
bool PtexDict< T >::const_iterator::operator== ( const iterator iter) const
inline

For comparing equality of iterators.

Definition at line 404 of file PtexDict.h.

References PtexDict< T >::iterator::_e.

template<class T>
bool PtexDict< T >::const_iterator::operator== ( const const_iterator iter) const
inline

For comparing equality of const_iterators.

Definition at line 410 of file PtexDict.h.

References PtexDict< T >::const_iterator::_e.

Friends And Related Function Documentation

template<class T>
friend class iterator
friend

Definition at line 430 of file PtexDict.h.

template<class T>
friend class PtexDict
friend

Definition at line 429 of file PtexDict.h.

Member Data Documentation

template<class T>
int PtexDict< T >::const_iterator::_b
private

bucket number this references

Definition at line 433 of file PtexDict.h.

Referenced by PtexDict< T >::const_iterator::operator=().

template<class T>
const PtexDict* PtexDict< T >::const_iterator::_d
private

dictionary back reference

Definition at line 431 of file PtexDict.h.

Referenced by PtexDict< T >::const_iterator::operator=().

template<class T>
PtexDict< T >::value_type PtexDict< T >::const_iterator::_defaultVal
staticprivate

Default value.

Definition at line 435 of file PtexDict.h.

template<class T>
Entry** PtexDict< T >::const_iterator::_e
private

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