Baigudin Software avatar
EOOS Systems logo
home
ru region
en region

Interface «eoos::api::ListIterator<T>»

List iterator interface.

public: virtual ~ListIterator();

Destructor.

public: virtual bool_t add(T const& element);

Parameters:
element — An inserting element.

Returns:
True if element is added.

public: virtual T const& getIllegal();

Returns illegal element which will be returned as error value.

Returns:
Illegal element.

public: virtual T& getNext();

Returns next element and advances the cursor position.

Returns:
Reference to element.

public: virtual bool_t getNextIndex() const;

Returns:
For LinkedList: Index of the next element or list size if the list iterator is at the end of the list. For CircularList: Index of the previous element or -1 if the list is empty. On error ERROR_INDEX is returned.

public: virtual T& getPrevious();

Returns previous element and advances the cursor backwards.

Returns:
Reference to element.

public: virtual int32_t getPreviousIndex() const;

Returns:
For LinkedList: Index of the previous element or -1 if the the iterator is at the beginning of the list. For CircularList: Index of the previous element or -1 if the list is empty. On error ERROR_INDEX is returned.

public: virtual bool_t hasNext() const;

Tests if this iteration may return a next element.

Returns:
True if next element is had.

public: virtual bool_t hasPrevious() const;

Tests if this iteration may return a previous element.

Returns:
True if previous element is had.

public: virtual bool_t isConstructed() const;

Tests if this object has been constructed.

Returns:
True if object has been constructed successfully.

public: virtual bool_t isIllegal(T const& value) const;

Tests if given value is an illegal.

Parameters:
value — A testing value.

Returns:
True if value is an illegal.

public: virtual bool_t remove();

Returns:
True if an element is removed successfully.

public: virtual void setIllegal(T const& value);

Sets illegal element which will be returned as error value.

Parameters:
value — An illegal value.

Back to class list