Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
BaseDListC::BaseDListC(void)
BaseDListC::BaseDListC(const BaseDListC &)
BaseDListC::Copy(void) const
BaseDListC::operator=(const BaseDListC &)
BaseDListC::~BaseDListC(void)
BaseDListC::Size(void) const
BaseDListC::operator==(const BaseDListC &) const
BaseDListC::operator!=(const BaseDListC &) const
BaseDListC::IsEmpty(void) const
BaseDListC::First(void) const
BaseDListC::First(void)
BaseDListC::Last(void) const
BaseDListC::Last(void)
BaseDListC::operator[](ListIndexT) const
BaseDListC::operator[](ListIndexT)
BaseDListC::LinkFirst(DChainC *)
BaseDListC::LinkLast(DChainC *)
BaseDListC::UnlinkFirst(void)
BaseDListC::UnlinkLast(void)
BaseDListC::MakeFirst(DChainC &)
BaseDListC::MakeLast(DChainC &)
BaseDListC::MoveFirst(DChainC &)
BaseDListC::MoveLast(DChainC &)
BaseDListC::MakeFirst(BaseConstDLIterC &)
BaseDListC::MakeLast(BaseConstDLIterC &)
BaseDListC::MoveFirst(BaseConstDLIterC &)
BaseDListC::MoveLast(BaseConstDLIterC &)
BaseDListC::MoveFirst(BaseDListC &)
BaseDListC::MoveLast(BaseDListC &)
BaseDListC::operator+=(BaseDListC &)
BaseDListC::Reverse(void)
BaseDListC::Tail(DChainC &)
BaseDListC::Head(DChainC &)
BaseDListC::Tail(BaseConstDLIterC &)
BaseDListC::Head(BaseConstDLIterC &)
BaseDListC::ConsistencyCheck(ListSizeT) const
BaseDListC::Iter(void) const
BaseDListC::BaseDListC(int,BaseConstDLIterC &)
BaseDListC::BaseDListC(BaseConstDLIterC &,int)
BaseDListC::ListHead(void) const
BaseDListC::BaseDListC(DChainC &,DChainC &)
BaseDListC::Empty(void)
BaseDListC::operator<<(ostream &,const BaseDListC &)
BaseDListC
 
pure double-linked circular list
 
include "amma/BDList.hh"
User Level:Default
Library:Mlist
Example:exBuffer.cc
Section:Containers.Lists.DList
In Scope:std

Comments:
The BaseDListC class represents double-linked list of elements without any contents. The list contains a head element and a chain of elements. Empty list contains just its head element. Because of efficiency references to elements of a list are not checked if they are proper elements of a list or its head. The class serves as a base class for double-linked list of elements containing more data. Implementation notes: The head must be defined as a base class of the class BaseDListC to make a cast from the head structure to the whole list structure possible.

Parent Classes: Derived Classes: Typedefs:
typedef IndexC ListIndexT;
The index of an item saved in a list.

typedef SizeT ListSizeT;
The number of items stored in a list.

Methods:
BaseDListC()
An empty list.

BaseDListC(const BaseDListC & li)
Copy constructor. The physical copy of the list 'li' is created.

BaseDListC Copy() const
Create a copy of this list.

const BaseDListC & operator=(const BaseDListC & list)

~BaseDListC()
The destructor of the list, each list element is destroyed. Status functions ----------------

ListSizeT Size() const
Returns the length of a list. It does not check the counter overflow.

BooleanT operator==(const BaseDListC & list) const
Returns TRUE if both lists represent the same list.

BooleanT operator!=(const BaseDListC & list) const
Returns TRUE if both lists are independent.

BooleanT IsEmpty() const
Returns TRUE if the list is empty. Access to the elements ----------------------

const DChainC & First() const
Returns the first element of the constant list.

DChainC & First()
Returns the first element of the list.

const DChainC & Last() const
Returns the last element of the constant list.

DChainC & Last()
Returns the last element of the constant list.

const DChainC & operator[](ListIndexT i) const
Returns the (i+1)-th element of the constant list. The first element has index 0.

DChainC & operator[](ListIndexT i)
Returns the (i+1)-th element of the list. The first element has index 0. Elementary changes in the list ------------------------------

BaseDListC & LinkFirst(DChainC * elm)
Links in the new element at the beginning of the list. Returns the reference to the changed list.

BaseDListC & LinkLast(DChainC * elm)
Links in the new element at the end of the list. Returns the pointer to the list.

DChainC * UnlinkFirst()
Removes the first element from the list. Returns that removed element.

DChainC * UnlinkLast()
Removes the last element from the list. Returns that removed element.

BaseDListC & MakeFirst(DChainC & elm)
Moves the head of the list to be the predeccessor of the element 'elm'. The element 'elm' must belong to this list. Returns the reference to the list.

BaseDListC & MakeLast(DChainC & elm)
Moves the head of the list to be the successor of the element 'elm'. The element 'elm' must belong to this list. Returns the reference to the list.

BaseDListC & MoveFirst(DChainC & elm)
Moves the list element 'elm' into the list as the first element. The pointed list element need not to be the element of this list, but it cannot be the head of any list. Returns this list.

BaseDListC & MoveLast(DChainC & elm)
Moves the list element, which 'elm' points to, into the list as the last element. The pointed list element need not to be the element of this list, but it cannot be the head of any list. Returns this list.

BaseDListC & MakeFirst(BaseConstDLIterC & elm)
Moves the head of the list to be the predeccessor of the element 'elm'. The element 'elm' must belong to this list. Returns the reference to the list.

BaseDListC & MakeLast(BaseConstDLIterC & elm)
Moves the head of the list to be the successor of the element 'elm'. The element 'elm' must belong to this list. Returns the reference to the list.

BaseDListC & MoveFirst(BaseConstDLIterC & elm)
Moves the list element 'elm' into the list as the first element. The pointed list element need not to be the element of this list, but it cannot be the head of any list. Returns this list.

BaseDListC & MoveLast(BaseConstDLIterC & elm)
Moves the list element, which 'elm' points to, into the list as the last element. The pointed list element need not to be the element of this list, but it cannot be the head of any list. Returns this list. Transformations of lists ------------------------

BaseDListC & MoveFirst(BaseDListC & list)
Moves the whole 'list' to the beginning of this list. The 'list' will be empty after the operation. Returns this list.

BaseDListC & MoveLast(BaseDListC & list)
Moves the whole 'list' to the end of this list. The 'list' will be empty after the operation. Returns this list.

const BaseDListC & operator+=(BaseDListC & list)
Concatenation. The operator moves the whole 'list to the end of this list. The 'list' will be empty after the operation. Returns this list.

BaseDListC & Reverse()
Reverses the list. Returns the list.

BaseDListC Tail(DChainC & elm)
Splits the list into two parts. This list will contain the beginning of the original list. The function returns the second part of the original list including the element 'elm'.

BaseDListC Head(DChainC & elm)
Splits the list into two parts. This list will contain the second part of the original list including the element 'elm'. The function returns the list containing the beginning of the original list.

BaseDListC Tail(BaseConstDLIterC & elm)
Splits the list into two parts. This list will contain the beginning of the original list. The function returns the second part of the original list including the element 'elm'.

BaseDListC Head(BaseConstDLIterC & elm)
Splits the list into two parts. This list will contain the second part of the original list including the element 'elm'. The function returns the list containing the beginning of the original list.

void ConsistencyCheck(ListSizeT stopSize = 30000) const
Checks the list if all links are valid. If the counter of elements during the checking overflows the number 'stopSize', the function exits with error.

BaseConstDLIterC Iter() const
Creates an iterator of the list. The iterator will point to the first element if there is any.

BaseDListC(int,BaseConstDLIterC & elm)
Nickname for Tail(BaseConstDLIterC & elm);

BaseDListC(BaseConstDLIterC & elm,int)
Nickname for Head(BaseConstDLIterC & elm);

const DChainC * ListHead() const
Returns the pointer to the head of the list. The function is used to avoid bugs in GNU C++ 2.4.5.

BaseDListC(DChainC & firstCut,DChainC & firstNotCut)
Creates a new list from the part of another list. The cut part must not contain a head of a list and it begins with 'firstCut' element and ends with the predecessor of 'firstNotCut' element.

BaseDListC & Empty()
All elements are deleted from the list.

ostream & operator<<(ostream & s,const BaseDListC & list)


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001