Non const iterator. More...
#include <ilserver/model.h>
Inherits IlsViewedRelIterator.
Public Member Functions | |
Iterator (Myself &r) | |
Creates an iterator for the list supplied as its argument. | |
Iterator (const Iterator &rhs) | |
This copy constructor creates an iterator with the same characteristics as the one supplied as its argument. More... | |
virtual IlsBoolean | eol () const |
Returns IlsTrue if the end of the list has been reached. | |
Iterator & | gotoEnd () |
Moves the iterator to the end of the list. | |
operator IlsBoolean () const | |
This conversion operator indicates whether the iterator has reached the end of the list. It returns IlsFalse if the list is empty, or if at least one unsuccessful extraction has been performed. | |
IlsBoolean | operator!= (const Iterator &rhs) const |
Indicates whether the iterator is not at the same position as the one supplied as its argument. | |
OriginType * | operator* () const |
Returns the next item to be read. The iterator remains at the same position. | |
Position | operator+ (int i) const |
Moves the iterator forward in the list according to the value supplied as its argument. More... | |
Iterator & | operator++ () |
This increment operator moves the iterator to the next item in the list. More... | |
Iterator & | operator++ (int) |
This operator is identical to operator++() except that it uses a prefix notation. More... | |
Iterator & | operator+= (int i) |
Moves the iterator forward according to the value supplied as its argument. More... | |
Position | operator- (int i) const |
Moves the iterator backward in the list according to the value supplied as its argument. More... | |
Iterator & | operator-- () |
Moves the iterator to the previous item in the list. More... | |
Iterator & | operator-- (int) |
This operator is identical to operator--() except that it uses a prefix notation. More... | |
Iterator & | operator-= (int i) |
Moves the iterator backward according to the value supplied as its argument. More... | |
Iterator & | operator<< (OriginType *p) |
Adds an item to the list and puts it after the last item read by the iterator or at the beginning of the list if the iterator has not yet been used. More... | |
Iterator & | operator= (const Position &rhs) |
Assigns the position provided as its argument to another position and returns the position supplied. | |
Iterator & | operator= (const Iterator &rhs) |
Moves the iterator to the same position as the one supplied as its argument. | |
IlsBoolean | operator== (const Iterator &rhs) const |
Indicates whether the iterator is at the same position as the one supplied as its argument. | |
Iterator & | operator>> (OriginType *&p) |
Sequentially reads the items in the list. More... | |
OriginType * | operator[] (int i) const |
Returns the i -th list element. | |
Iterator & | reset () |
Resets the iterator so that it points again to the first item of the list. | |
Iterator & | seekp (const Position &position) |
Moves the iterator to the specified position. | |
Iterator & | shrink () |
Removes the item following the last element read from the list, or, if the list has not been read yet, it removes the first item in the list. More... | |
Iterator & | shrinkBefore () |
Removes the last item read from the list. More... | |
Position | tellp () const |
Returns the position of the iterator. | |
Non const iterator.
Library: server
IlsInvertedRelationList< TargetType, OriginType >::Iterator::Iterator | ( | const Iterator & | rhs | ) |
This copy constructor creates an iterator with the same characteristics as the one supplied as its argument.
This iterator points to the same item in the list as the iterator supplied as its argument.
Position IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator+ | ( | int | i | ) | const |
Moves the iterator forward in the list according to the value supplied as its argument.
IlsEndOfList | If the iterator is moved past the last list item. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator++ | ( | ) |
This increment operator moves the iterator to the next item in the list.
IlsEndOfList | If the iterator is moved past the last list item. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator++ | ( | int | ) |
This operator is identical to operator++()
except that it uses a prefix notation.
IlsEndOfList | If the iterator is moved past the last list item. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator+= | ( | int | i | ) |
Moves the iterator forward according to the value supplied as its argument.
IlsEndOfList | If the value provided moves the iterator past the last list item. |
Position IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator- | ( | int | i | ) | const |
Moves the iterator backward in the list according to the value supplied as its argument.
IlsBeginningOfList | If the iterator is moved past the first list item. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator-- | ( | ) |
Moves the iterator to the previous item in the list.
IlsBeginningOfList | If the iterator is moved past the first list item. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator-- | ( | int | ) |
This operator is identical to operator--()
except that it uses a prefix notation.
IlsBeginningOfList | If the iterator is moved past the first list item. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator-= | ( | int | i | ) |
Moves the iterator backward according to the value supplied as its argument.
IlsBeginningOfList | If the value provided moves the iterator past the first list item. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator<< | ( | OriginType * | p | ) |
Adds an item to the list and puts it after the last item read by the iterator or at the beginning of the list if the iterator has not yet been used.
iw
is an iterator that performs write operations and ir
is an iterator that performs read operations. If ir
and iw
point to the same item in the list and if iw
is used to add an item to this list, ir
may behave unexpectedly.IlsMaxCardViolated | If attempting to add an item to the list when the maximum cardinality has been reached. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::operator>> | ( | OriginType *& | p | ) |
Sequentially reads the items in the list.
When the iterator is used for the first time, the item read is the one at the beginning of the list.
If the iterator has reached the last item in the list, and if the list is not empty, no value is assigned to the argument of the operator during the next read operation. The conversion operator to IlsBoolean
returns IlsFalse
(see IlsBoolean()).
If an iterator is built for an empty list, the conversion operator of the iterator returns IlsFalse
.
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::shrink | ( | ) |
Removes the item following the last element read from the list, or, if the list has not been read yet, it removes the first item in the list.
iw
that performs write operations and an iterator ir
that performs read operations. If ir
and iw
point to the same item in the list and if iw
executes the function shrink()
, ir
may behave unexpectedly. Likewise, if iw
points to a given item in the list and ir
points to the next item, ir
may behave unexpectedly if iw
executes the function shrink()
.IlsMinCardViolated | If this function is called when the minimum cardinality of the list has been reached. |
IlsEndOfList | If it is called when the iterator points to the last item of the list. |
Iterator& IlsInvertedRelationList< TargetType, OriginType >::Iterator::shrinkBefore | ( | ) |
Removes the last item read from the list.
Restrictions of the same kind as those mentioned for shrink()
apply to shrinkBefore()
.
\throw IlsMinCardViolated If this function is called when the minimal cardinality of the list has been reached. \throw IlsBeginningOfList If it is called when the iterator points to the first item of the list.
© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.