Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

oxygen::Predicate::Iterator Class Reference

ParameterList::TVectr::const_iterator together with a reference to the ParameterList the iterator belongs to. More...

#include <predicate.h>

Collaboration diagram for oxygen::Predicate::Iterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Iterator (const zeitgeist::ParameterList *l, zeitgeist::ParameterList::TVector::const_iterator i)
 constructs an Iterator pointing to element i of list l
 Iterator::Iterator (const zeitgeist::ParameterList *l)
 constructs an Iterator pointing to the first element of list l
 Iterator (const Predicate &predicate)
 constructs an Iterator pointing to the first element of predicate::parameter
 Iterator ()
 construct an Iterator pointing to Predicate::nullParamList.
const boost::any & operator * () const
 aeturns the element this Iterator points to
void operator++ ()
 advances this Iterator on element if possible
Iterator begin () const
 constructs an Iterator pointing to the first element of the associated list
Iterator end () const
 constructs an Iterator pointing to the end() element of the associated list
bool operator!= (const Iterator &i) const
bool operator== (const Iterator &i) const
const zeitgeist::ParameterList::TVector::const_iterator & GetIterator () const
zeitgeist::ParameterList::TVector::const_iterator & GetIterator ()
const zeitgeist::ParameterListGetList () const

Protected Attributes

const zeitgeist::ParameterListlist
 the associated list
zeitgeist::ParameterList::TVector::const_iterator iter
 the encapsulated iterator

Detailed Description

ParameterList::TVectr::const_iterator together with a reference to the ParameterList the iterator belongs to.

It tries to mimic the behaviour of an STL iterator as much as possible.

This class is necessary because it is not sufficient for the FindParameter method to return a single iterator without the corresponding list as it is possible for list to be nested. A subsequent GetValue method would not be able to test if the end of a TParameterList is reached without knowing the list an iterator belongs to.

Definition at line 65 of file predicate.h.


Constructor & Destructor Documentation

oxygen::Predicate::Iterator::Iterator const zeitgeist::ParameterList l,
zeitgeist::ParameterList::TVector::const_iterator  i
 

constructs an Iterator pointing to element i of list l

Predicate::Iterator::Iterator const Predicate predicate  ) 
 

constructs an Iterator pointing to the first element of predicate::parameter

Definition at line 39 of file predicate.cpp.

Predicate::Iterator::Iterator  ) 
 

construct an Iterator pointing to Predicate::nullParamList.

This empty static parameter list acts as a null element and avoids special cases for list==0 in the Iterator implementation.

Definition at line 42 of file predicate.cpp.

Referenced by begin(), and end().


Member Function Documentation

Predicate::Iterator Predicate::Iterator::begin  )  const
 

constructs an Iterator pointing to the first element of the associated list

Definition at line 58 of file predicate.cpp.

References zeitgeist::ParameterList::begin(), Iterator(), and list.

Here is the call graph for this function:

Predicate::Iterator Predicate::Iterator::end  )  const
 

constructs an Iterator pointing to the end() element of the associated list

Definition at line 63 of file predicate.cpp.

References zeitgeist::ParameterList::end(), Iterator(), and list.

Here is the call graph for this function:

ParameterList::TVector::const_iterator & Predicate::Iterator::GetIterator  ) 
 

Returns:
a reference to the encapsulated iterator

Definition at line 90 of file predicate.cpp.

References iter.

const ParameterList::TVector::const_iterator & Predicate::Iterator::GetIterator  )  const
 

Returns:
a reference to the encapuslated iterator

Definition at line 85 of file predicate.cpp.

References iter.

Referenced by oxygen::Predicate::AdvanceValue(), oxygen::Predicate::DescentList(), oxygen::Predicate::GetAnyValue(), and oxygen::Predicate::GetValue().

const ParameterList * Predicate::Iterator::GetList  )  const
 

Returns:
a pointer to the associated list

Definition at line 95 of file predicate.cpp.

References list.

Referenced by oxygen::Predicate::AdvanceValue(), oxygen::Predicate::GetAnyValue(), and oxygen::Predicate::GetValue().

oxygen::Predicate::Iterator::Iterator::Iterator const zeitgeist::ParameterList l  ) 
 

constructs an Iterator pointing to the first element of list l

const boost::any & Predicate::Iterator::operator *  )  const
 

aeturns the element this Iterator points to

Definition at line 45 of file predicate.cpp.

References iter.

bool Predicate::Iterator::operator!= const Iterator i  )  const
 

Returns:
true if this Iterator and i are not identical

Definition at line 68 of file predicate.cpp.

References iter, and list.

void Predicate::Iterator::operator++  ) 
 

advances this Iterator on element if possible

Definition at line 50 of file predicate.cpp.

References zeitgeist::ParameterList::end(), iter, and list.

Here is the call graph for this function:

bool Predicate::Iterator::operator== const Iterator i  )  const
 

Returns:
true if this Iterator and i are identical

Definition at line 76 of file predicate.cpp.

References iter, and list.


Member Data Documentation

zeitgeist::ParameterList::TVector::const_iterator oxygen::Predicate::Iterator::iter [protected]
 

the encapsulated iterator

Definition at line 122 of file predicate.h.

Referenced by GetIterator(), operator *(), operator!=(), operator++(), and operator==().

const zeitgeist::ParameterList* oxygen::Predicate::Iterator::list [protected]
 

the associated list

Definition at line 119 of file predicate.h.

Referenced by begin(), end(), GetList(), operator!=(), operator++(), and operator==().


The documentation for this class was generated from the following files:
Generated on Thu Apr 6 15:44:33 2006 for rcssserver3d by  doxygen 1.4.4