- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
pdftron::SDF::DictIterator Class Reference

`#include <DictIterator.h>`

## Public Member Functions
void | Next ()
SDF::Obj | Key ()
SDF::Obj | Value ()
bool | HasCurrent ()
bool | HasNext ()
| DictIterator (const DictIterator &c)
DictIterator & | operator= (const DictIterator &other)
| ~DictIterator ()
void | Destroy ()

## Detailed Description

DictIterator is used to traverse key/value pairs in a dictionary. For example a DictIterator can be used to print out all the entries in a given Obj dictionary as follows:

* DictIterator itr = dict.GetDictIterator();
* while (itr.HasCurrent()) {
* Obj key = itr.Key();
* cout << key.GetName() << endl;
* Obj value = itr.Value();
* // ...
* itr.Next()
* }
*

Definition at line 32 of file DictIterator.h.

## Constructor & Destructor Documentation

pdftron::SDF::DictIterator::DictIterator | ( | const DictIterator & | c | ) |

Copy constructor.

pdftron::SDF::DictIterator::~DictIterator | ( |  | ) |

## Member Function Documentation

void pdftron::SDF::DictIterator::Destroy | ( |  | ) |

Frees the native memory of the object.

bool pdftron::SDF::DictIterator::HasCurrent | ( |  | ) |

Returns
  true if the current iterator is not the end of the collection

bool pdftron::SDF::DictIterator::HasNext | ( |  | ) |

Returns
  true if the current iterator is not the end of the collection Deprecated prefer HasCurrent()

SDF::Obj pdftron::SDF::DictIterator::Key | ( |  | ) |

Returns
  the key of the current dictionary entry.

void pdftron::SDF::DictIterator::Next | ( |  | ) |

Advances the iterator to the next element of the collection.

DictIterator& pdftron::SDF::DictIterator::operator= | ( | const DictIterator & | other | ) |

SDF::Obj pdftron::SDF::DictIterator::Value | ( |  | ) |

Returns
  the value of the current dictionary entry.

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

- SDF/DictIterator.h