My Project
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
Value::Iterator Class Reference

This class implements an iterator through a Value list. More...

#include <Value.h>

Public Member Functions

 Iterator ()
 The default class constructor.
 
 Iterator (Value *start)
 The class constructor with the start value. More...
 
 ~Iterator ()
 The class destructor.
 
bool hasNext () const
 Will return true, if another value is in the list. More...
 
Value * getNext ()
 Returns the next item and moves the iterator to it. More...
 
const Iterator & operator++ (int)
 The post-increment operator.
 
Iterator & operator++ ()
 The pre-increment operator.
 
bool operator== (const Iterator &rhs) const
 The compare operator. More...
 
Value * operator-> () const
 The * operator. More...
 

Detailed Description

This class implements an iterator through a Value list.

When getting a new value you need to know how to iterate through it. The Value::Iterator will help you here:

Value *val = node->getValue();
Value::Iterator it( val );
while( it.hasNext() ) {
Value v( it.getNext );
}

Constructor & Destructor Documentation

Value::Iterator::Iterator ( Value *  start)

The class constructor with the start value.

Parameters
start[in] The first value for iteration,

Member Function Documentation

Value* Value::Iterator::getNext ( )

Returns the next item and moves the iterator to it.

Returns
The next value, is ddl_nullptr in case of being the last item.
bool Value::Iterator::hasNext ( ) const

Will return true, if another value is in the list.

Returns
true if another value is there.
Value* Value::Iterator::operator-> ( ) const

The * operator.

Returns
The instance or ddl_nullptr if end of list is reached.
bool Value::Iterator::operator== ( const Iterator &  rhs) const

The compare operator.

Parameters
rhs[in] The instance to compare.
Returns
true if equal.

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