|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
The class 'BaseIntrConstDLIterC' is a representation of iterator on
a body of a constant double-linked list. Therefore this iterator cannot
change the content of the list. Iterator is connected with a list. If the
list is empty, the iterator points to the head of the list. The result
of positioning of an iterator need not to be a proper element.
To avoid pointing to the head of the list the head skipping
moving operators NextCrc() and/or PrevCrc() must be used.
Parent Classes:
Derived Classes:
Methods:
- const DataC & Data() const
-
Access to the constant object contained in the list element.
- const IntrDListC<DataC> & List() const
-
Returns the list whose element is pointed to by this iterator.
------------ Predicates -------------------------------------
- BooleanT operator==(const BaseIntrConstDLIterC<DataC> & it) const
-
Returns TRUE if both iterators point to the same list element.
- BooleanT operator!=(const BaseIntrConstDLIterC<DataC> & it) const
-
Returns TRUE if this iterators points to a different list element
than the iterator 'it'.
- BooleanT IsFirst() const
-
Returns TRUE if the pointed element is the first in a list.
- BooleanT IsLast() const
-
Returns TRUE if the pointed element is the last one in a list.
- BooleanT IsElm() const
-
Returns TRUE if the pointed an proper element (not a head) of a list.
----------- Positioning the iterator -----------------------------
- BaseIntrConstDLIterC<DataC> & First()
-
Sets the iterator to point to the first element of the list.
- BaseIntrConstDLIterC<DataC> & Last()
-
Sets the iterator to point to the last element of the list.
- BaseIntrConstDLIterC<DataC> & Next()
-
Moves the iterator to the successor of the element.
- BaseIntrConstDLIterC<DataC> & Prev()
-
Moves the iterator to the predecessor of the element.
- BaseIntrConstDLIterC<DataC> & NextCrc()
-
Moves the iterator to the successor of the element. If the result
element is not a proper element of the list the iterator is moved
to the first element.
- BaseIntrConstDLIterC<DataC> & PrevCrc()
-
Moves the iterator to the predecessor of the element. If the result
element is not a proper element of the list the iterator is moved
to the last element.
- BaseIntrConstDLIterC<DataC> & Nth(LongIntT n)
-
Sets to the n-th element of the list. The index 'n' can be
negative. The first element of the list has the index 0,
the last element has the index -1. It does not skip the head
of the list.
- BaseIntrConstDLIterC<DataC> & RelNth(LongIntT n)
-
Moves to the n-th element from the current element.
The index 'n' can be positive, zero, or negative.
Particularly, the n = 0 means no move,
n = 1 means the move to the next element,
and n = -1 means the move to the previous element.
- LongIntT Index() const
-
Returns the offset of an element from the first element.
Particularly, it returns 0 if the iterator points to the first
element, it returns -1 if element is the head of the list,
and it returns -2 if the element is not contained in the list.
The function does not check counter overflow.
Array item constructors.
------------------------
ATTENTION! The following member functions can be used only
for initialization of arrays. This constructor is provided because
of trouble with an array of objects. The present ANSI C++
does not enable to pass any constructor of array elements
different from a defaut constructor. The extension of GNU g++
compiler is not supported by other compiler. The constructor
should be used only for such purposes. If this limitation of C++
is removed, the constructor will be obsolete.
- BaseIntrConstDLIterC()
-
The default constructor used by constructors of arrays.
It constructs the unvalid object which must be initialized by the
member function LateItemSet().
- void LateItemSet(IntrDListC<DataC> & list)
-
Sets the unvalid list iterator. The iterator will
point to the first item of the 'list', if there is any, otherwise
to the head of the list.
- void LateItemSet(const BaseIntrConstDLIterC<DataC> & iter)
-
Sets the unvalid list iterator to be the copy of the iterator 'iter'.
- BooleanT IsValid() const
-
Returns TRUE if the iterator was not constructed by the default
constructor.
- BaseIntrConstDLIterC(IntrDListC<DataC> & list,DataC & data)
-
- void Set(IntrDListC<DataC> & list,DataC * data)
-
Sets the iterator to point to the element 'data' that
belongs to the 'list'.
- BaseIntrConstDLIterC(const IntrDListC<DataC> & list)
-
Creates an iterator operating on the constant 'list'. The iterator
will point to the first element if there is any, otherwise
to the head of the list.
- BaseIntrConstDLIterC(const BaseIntrConstDLIterC<DataC> & iter)
-
Copy constructor.
- const BaseIntrConstDLIterC<DataC> & operator=(const BaseIntrConstDLIterC<DataC> & it)
-
Assingment. This iterator will point to the same list element as
the iterator 'it'.
- const BaseIntrConstDLIterC<DataC> & DLIter() const
-
Self-identification. The function returns this object.
- const BaseIntrConstDLIterC<DataC> & LinkBef(DataC * data)
-
Inserts the new element containing 'data' before the element
pointed to by this iterator. This iterator is returned.
- const BaseIntrConstDLIterC<DataC> & LinkAft(DataC * data)
-
Inserts the new element containing 'data' after the element
pointed to by this iterator. This iterator is returned.
- const BaseIntrConstDLIterC<DataC> & MoveBef(BaseIntrConstDLIterC<DataC> & iter)
-
The element pointed to by 'iter' is moved before the element
pointed to by this iterator. This iterator will point to the same
element as before, the iterator 'iter' will point to the previous
element in the original list.
- const BaseIntrConstDLIterC<DataC> & MoveAft(BaseIntrConstDLIterC<DataC> & iter)
-
The element pointed to by 'iter' is moved after the element
pointed to by this iterator. This iterator will point to the same
element as before, the iterator 'iter' will point to the previous
element in the original list.
- const BaseIntrConstDLIterC<DataC> & MoveBef(IntrDListC<DataC> & list)
-
All elements of the 'list' are moved before the element
pointed to by this iterator. The 'list' will be empty after
this operation.
- const BaseIntrConstDLIterC<DataC> & MoveAft(IntrDListC<DataC> & list)
-
All elements of the 'list' are moved before the element
pointed to by this iterator. The 'list' will be empty after
this operation.
- DataC * UnlinkMoveNext()
-
Unlink the element pointed to by this iterator and moves
iterator to the next element.
- DataC * Unlink()
-
Unlink the element pointed to by this iterator and moves
iterator to the previous element.
- ostream & operator<<(ostream & s,const BaseIntrConstDLIterC<DataC> & elm)
-
|
Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|