#include <d_Iterator.h>
Public Methods | |
| d_Iterator () | |
| d_Iterator (const d_Iterator< T > &iSource) | |
| d_Iterator (d_Collection< T > *iColl) | |
| ~d_Iterator () | |
| void | replace_element (const T &iValue) |
| void | remove_element () |
| T | operator * () |
| T | get_element () |
| d_Boolean | not_done () |
| void | advance (d_Boolean current=d_False) |
| d_Iterator< T > & | operator++ () |
| d_Iterator< T > | operator++ (const int iStep) |
| d_Boolean | next (T &iValue) |
| void | assign (const d_Collection< T > *iColl, d_Ref< oCollBlock< T > > &iBlock, const oUInt2 iPos) |
Public Attributes | |
| d_Collection< T > * | collection |
| d_Ref< oCollBlock< T > > | currBlock |
LOCATION: d_Iterator.h
USAGE: d_Iterator< <type-name> > <variable-name>;
Where:
<type-name>: Type to iterate. Can be a literal or a user type <variable-name>: is the name of d_Iterator object
EXAMPLES: d_Varray<d_String> stringColl; * Collection d_Iterator<d_String> iter = stringColl.create_iterator();
SEE ALSO: d_Bag, d_Collection, d_Dictionary, d_List, d_Set, d_Varray
ODMG: Compliant
|
|||||||||
|
Default Constructor. ODMG : Compliant |
|
||||||||||
|
Copy Constructor. Current iterator object and are totally independent, thus they can browse the same collection with no conflict. ODMG : Compliant |
|
||||||||||
|
Create a d_Iterator object by a collection. The new iterator point at the first element of collection. SEE ALSO: d_Collection::create_iterator() ODMG : Extension |
|
|||||||||
|
Destructor. ODMG : Compliant |
|
||||||||||
|
Advances the iterator to the next element of collection. Use it without specifying parameter (default = false). SEE ALSO: operator ++(), next() ODMG : Compliant |
|
||||||||||||||||||||
|
|
|
|||||||||
|
Returns the value of current element. SEE ALSO: operator*() ODMG : Compliant |
|
||||||||||
|
Checks the end of iteration and returns current value. It returns false if the iterator is positioned past the last element of iteration, otherwise assigns current value to parameter, advances the iterator, and returns true. SEE ALSO: advance(), operator ++() ODMG : Compliant |
|
|||||||||
|
Returns true if the iteration is not completed and there are some elements to visit. Call this method to determine whether iteration is complete (usually in a loop). ODMG : Compliant |
|
|||||||||
|
Returns the value of current element. SEE ALSO: get_element() ODMG : Compliant |
|
||||||||||
|
This is the postfix increment operator. It advances to the next element in the collection and returns the element pointed by iterator before the advancing. If this method is called after that the iterator has reached the end of iteration, a d_Error_IteratorExhausted exception is thrown. |
|
|||||||||
|
This is the prefix increment operator. It advances to the next element in the collection and returns it. If this method is called after that the iterator has reached the end of iteration, a d_Error_IteratorExhausted exception is thrown. |
|
|||||||||
|
Removes the current element pointed by the iterator. ODMG : Compliant |
|
||||||||||
|
Replaces current element. Replaces the value of the current element pointed by the iterator with . This method can be used only with d_List and d_Varray collections. ODMG : Compliant |
|
|||||
|
|
|
|||||
|
|
1.3-rc1