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

  PUBLIC
BodyDListC::BodyDListC(void)
BodyDListC::BodyDListC(const BodyDListC &)
BodyDListC::Copy(void) const
BodyDListC::operator=(const BodyDListC &)
BodyDListC::List(void) const
BodyDListC::~BodyDListC(void)
BodyDListC::operator==(const BodyDListC &) const
BodyDListC::operator!=(const BodyDListC &) const
BodyDListC::First(void) const
BodyDListC::First(void)
BodyDListC::Last(void) const
BodyDListC::Last(void)
BodyDListC::operator[](IndexT) const
BodyDListC::operator[](IndexT)
BodyDListC::InsFirst(const DataC &)
BodyDListC::InsLast(const DataC &)
BodyDListC::DelFirst(void)
BodyDListC::DelLast(void)
BodyDListC::GetFirst(void)
BodyDListC::GetLast(void)
BodyDListC::MakeFirst(BaseBodyConstDLIterC &)
BodyDListC::MakeLast(BaseBodyConstDLIterC &)
BodyDListC::MoveFirst(BaseBodyConstDLIterC &)
BodyDListC::MoveLast(BaseBodyConstDLIterC &)
BodyDListC::MoveFirst(BodyDListC &)
BodyDListC::MoveLast(BodyDListC &)
BodyDListC::operator+=(const BodyDListC &)
BodyDListC::Reverse(void)
BodyDListC::Tail(BaseBodyConstDLIterC &)
BodyDListC::Head(BaseBodyConstDLIterC &)
BodyDListC::Empty(void)
BodyDListC::MergeSort(ScopePath (*)(FuncArgList))
BodyDListC::BubbleSort(ScopePath (*)(FuncArgList))
BodyDListC<class DataC>
 
Body of double-linked circular list
 
include "amma/BoDList.hh"
User Level:Default
Library:Mlist
Example:exBuffer.cc
Section:Containers.Lists.DList
In Scope:std

Comments:
The BodyDListC class represents double-linked list of elements 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 refernce counted double-linked list. Implementation notes: The class BaseDListC must be defined as a base class of the class BodyDListC to make a cast from the head structure to the whole list structure possible.

Parent Classes: Derived Classes: Methods:
BodyDListC()
An empty list.

BodyDListC(const BodyDListC<DataC> & li)
Copy constructor. The physical copy of the list 'li' is created.

BodyDListC<DataC> Copy() const
Create a copy of this list.

const BodyDListC<DataC> & operator=(const BodyDListC<DataC> & list)
An assigment of a list. This list will contain a new copy of the 'list'. At first the list is emptied. At second copies of all elements of the 'list' are inserted to this list.

const BodyDListC<DataC> & List() const

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

BooleanT operator==(const BodyDListC<DataC> & list) const
Returns TRUE if both lists represent the same list.

BooleanT operator!=(const BodyDListC<DataC> & list) const
Returns TRUE if both lists are independent. ---------- Access to the elements -----------------------------

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

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

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

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

const DataC & operator[](IndexT i) const
Returns the i-th element of the constant list. The first element has the index 0.

DataC & operator[](IndexT i)
Returns the i-th element of the list. The first element has the index 0. ---------- Elementary changes in the list -------------

BodyDListC<DataC> & InsFirst(const DataC & data)
Inserts the new element at the beginning of the list. Returns the reference to the changed list.

BodyDListC<DataC> & InsLast(const DataC & data)
Inserts the new element at the end of the list. Returns the pointer to the list.

BodyDListC<DataC> & DelFirst()
Deletes the first element of the list. Returns the reference to the list.

BodyDListC<DataC> & DelLast()
Deletes the last element of the list. Returns the reference to the list.

DataC GetFirst()
Removes the first element from the list. Returns that removed element.

DataC GetLast()
Removes the last element from the list. Returns that removed element.

BodyDListC<DataC> & MakeFirst(BaseBodyConstDLIterC<DataC> & ptr)
Moves the head of the list to be the predeccessor of the element pointed to be 'ptr'. The iterator 'ptr' must belong to this list. Returns the reference to the list.

BodyDListC<DataC> & MakeLast(BaseBodyConstDLIterC<DataC> & ptr)
Moves the head of the list to be the successor of the element pointed to by 'ptr'. The iterator 'ptr' must belong to this list. Returns the reference to the list.

BodyDListC<DataC> & MoveFirst(BaseBodyConstDLIterC<DataC> & ptr)
Moves the list element pointed to by 'ptr' 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.

BodyDListC<DataC> & MoveLast(BaseBodyConstDLIterC<DataC> & ptr)
Moves the list element, which 'ptr' 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 -----------------------------

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

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

const BodyDListC<DataC> & operator+=(const BodyDListC<DataC> & list)
Concatenation. The operator adds the copy of the 'list to the end of this list. Returns this list.

BodyDListC<DataC> & Reverse()
Reverses the list. Returns the list.

BodyDListC<DataC> Tail(BaseBodyConstDLIterC<DataC> & ptr)
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 'ptr'.

BodyDListC<DataC> Head(BaseBodyConstDLIterC<DataC> & ptr)
Splits the list into two parts. This list will contain the second part of the original list including the element 'ptr'. The function returns the list containing the beginning of the original list.

BodyDListC<DataC> & Empty()
All elements of the list will be destroyed.

void MergeSort(ScopePath (*)(FuncArgList) LessOrEqual)
Sorts the list according to order defined by the function 'LessOrEqual'.

void BubbleSort(ScopePath (*)(FuncArgList) LessOrEqual)
Sorts the list according to order defined by the function 'LessOrEqual'. NOT READY !!!


Programmer:Radek Marik, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001