Ptex: PtexDict< T >::iterator Class Reference

Ptex

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

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...
iterator & | operator= (const iterator &iter)
| Proper assignment operator. More...
value_type & | operator* () const
| Operator for obtaining the value that the iterator references. More...
value_type * | operator-> () 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...
iterator & | operator++ (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_type & | getValue () 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 |  | ) |

For advancing the iterator to the next element.

Definition at line 442 of file PtexDict.h.

References PtexDict< T >::iterator::_b, PtexDict< T >::_buckets, PtexDict< T >::iterator::_d, PtexDict< T >::iterator::_e, PtexDict< T >::Entry::_next, and PtexDict< T >::_numBuckets.

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

bucket number this references

Definition at line 356 of file PtexDict.h.

Referenced by PtexDict< T >::iterator::operator++(), PtexDict< T >::iterator::operator=(), and PtexDict< T >::const_iterator::operator=().

template<class T>

const PtexDict* PtexDict< T >::iterator::_d
| private

dictionary back reference

Definition at line 354 of file PtexDict.h.

Referenced by PtexDict< T >::iterator::operator++(), PtexDict< T >::iterator::operator=(), and PtexDict< T >::const_iterator::operator=().

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

pointer to entry in table this iterator refs

Definition at line 355 of file PtexDict.h.

Referenced by PtexDict< T >::erase(), PtexDict< T >::iterator::operator!=(), PtexDict< T >::const_iterator::operator!=(), PtexDict< T >::iterator::operator++(), PtexDict< T >::iterator::operator=(), PtexDict< T >::const_iterator::operator=(), PtexDict< T >::iterator::operator==(), and PtexDict< T >::const_iterator::operator==().

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

- PtexDict.h