IlsUsesList::ConstIterator
 
IlsUsesList::ConstIterator
Category 
Nested class
Description 
ConstIterator is a class nested in the template IlsUsesList. An iterator is used to sequentially read a list of use relations.
Related Pattern 
Iterator
Library 
<server>
Header File 
#include <ilserver/model.h>
Synopsis 
class ConstIterator
{
public:
ConstIterator(IlsUsesList&);
ConstIterator(Iterator&);
 
ConstIterator& operator>>(UsedTypeP&);
ConstIterator& operator++();
ConstIterator& operator++(int);
ConstIterator& operator--();
ConstIterator& operator--(int);
ConstIterator& operator=(const Position&);
ConstIterator& operator=(const Iterator&);
CUsedTypePR operator*() const;
IlsBoolean operator==(const Iterator&);
IlsBoolean operator!=(const Iterator&);
Position operator+(int);
Position operator-(int);
ConstIterator& operator+=(int);
ConstIterator& operator-=(int);
IlsBoolean eol()const;
CUsedTypePR operator[](int);
operator IlsBoolean();
Position tellp();
ConstIterator& seekp(const Position& position);
ConstIterator& reset();
ConstIterator& gotoEnd();
};
Constructors 
ConstIterator(IlsUsesList&);
This constructor creates an iterator for the list supplied as its argument.
ConstIterator(Iterator&);
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.
Member Functions 
Position tellp();
This member function returns the position of the iterator.
ConstIterator& seekp(const Position& position);
This member function moves the iterator to the specified position.
ConstIterator& reset();
This member function resets the iterator so that it points again to the first item of the list.
ConstIterator& gotoEnd();
This member function moves the iterator to the end of the list.
Operators 
ConstIterator& operator>>(UsedTypeP&);
This operator 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 operator IlsBoolean.) If an iterator is built for an empty list, the conversion operator of the iterator returns IlsFalse.
ConstIterator& operator++();
This increment operator moves the iterator to the next item in the list. If the iterator is moved past the last list item, the exception IlsEndOfList is thrown.
ConstIterator& operator++(int);
This operator is identical to the previous one except that it uses a prefix notation.
ConstIterator& operator--();
This operator moves the iterator to the previous element in the list. If the iterator is moved past the first list item, the exception IlsBeginningOfList is thrown.
ConstIterator& operator--(int);
This operator is identical to the previous one except that it uses a prefix notation.
ConstIterator& operator=(const Position&);
This operator moves the iterator to the specified position.
ConstIterator& operator=(const Iterator&);
This operator moves the iterator to the same position as the one supplied as its argument.
CUsedTypePR operator*() const;
This operator returns the next item to be read. The iterator remains at the same position.
IlsBoolean operator==(const Iterator&);
This operator indicates whether the iterator is at the same position as the one supplied as its argument.
IlsBoolean operator!=(const Iterator&);
This operator indicates whether the iterator is at the same position as the one supplied as its argument.
Position operator+(int);
This operator moves the iterator forward in the list according to the value supplied as its argument. If the iterator is moved past the last list item, the exception IlsEndOfList is thrown.
Position operator-(int);
This operator moves the iterator backwards according to the value supplied as its argument. If the iterator is moved past the first list item, the exception IlsBeginningOfList is thrown.
ConstIterator& operator+=(int);
This operator moves the iterator forward according to the value supplied as its argument. If the provided value moves the iterator past the last list item, the exception IlsEndOfList is thrown.
ConstIterator& operator-=(int);
This operator moves the iterator backwards according to the value supplied as its argument. If the provided value moves the iterator past the first list item, the exception IlsBeginningOfList is thrown.
IlsBoolean eol()const;
This operator returns IlsTrue if the end of the list has been reached.
CUsedTypePR operator[](int i);
This operator returns the i-th element of the list.
operator IlsBoolean();
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 was performed.
See Also 
Exceptions, IlsUsesList, IlsUsesList::Iterator, IlsUsesList::Position

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.