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

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

#include <PtexDict.h>

Public Member Functions

 iterator ()
 Default Constructor. More...
 
 iterator (const iterator &iter)
 Proper copy constructor implementation. More...
 
iteratoroperator= (const iterator &iter)
 Proper assignment operator. More...
 
value_typeoperator* () const
 Operator for obtaining the value that the iterator references. More...
 
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 iterators. More...
 
bool operator!= (const const_iterator &iter) const
 For comparing inequality of iterators. More...
 
iteratoroperator++ (int)
 For advancing the iterator to the next element. More...
 

Private Member Functions

 iterator (Entry **e, const PtexDict *d, int b)
 Constructor Helper for inline creation. More...
 
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 const_iterator
 

Detailed Description

template<class T>
class PtexDict< T >::iterator

Internal class used to provide iteration through the dictionary.

This works on non-const types, and provides type safe modification access

Author
brentb
longson
Version
1.0 brentb 11/01/2000: Initial version
1.1 longson 06/26/2001: Added file and class comment headers
1.2 longson 01/16/2002: Made const-safe with const_iterator

Definition at line 306 of file PtexDict.h.

Constructor & Destructor Documentation

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

Default Constructor.

Definition at line 309 of file PtexDict.h.

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

Proper copy constructor implementation.

Definition at line 312 of file PtexDict.h.

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

Constructor Helper for inline creation.

Definition at line 344 of file PtexDict.h.

Member Function Documentation

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

simple helper function for retrieving the value from the Entry

Definition at line 347 of file PtexDict.h.

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

For determining whether or not an iterator is valid.

Definition at line 324 of file PtexDict.h.

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

For comparing inequality of iterators.

Definition at line 330 of file PtexDict.h.

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

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

For comparing inequality of iterators.

Definition at line 336 of file PtexDict.h.

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

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

Operator for obtaining the value that the iterator references.

Definition at line 319 of file PtexDict.h.

template<class T >
PtexDict< T >::iterator & PtexDict< T >::iterator::operator++ ( int  )
template<class T>
value_type* PtexDict< T >::iterator::operator-> ( ) const
inline

Pointer reference operator.

Definition at line 321 of file PtexDict.h.

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

Proper assignment operator.

Definition at line 315 of file PtexDict.h.

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

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

For comparing equality of iterators.

Definition at line 327 of file PtexDict.h.

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

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

For comparing equality of iterators.

Definition at line 333 of file PtexDict.h.

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

Friends And Related Function Documentation

template<class T>
friend class const_iterator
friend

Definition at line 353 of file PtexDict.h.

template<class T>
friend class PtexDict
friend

Definition at line 352 of file PtexDict.h.

Member Data Documentation

template<class T>
int PtexDict< T >::iterator::_b
private
template<class T>
const PtexDict* PtexDict< T >::iterator::_d
private
template<class T>
PtexDict< T >::value_type PtexDict< T >::iterator::_defaultVal
staticprivate

Default value.

Definition at line 358 of file PtexDict.h.

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

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