User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Lists - DListBodyC<class DataT>
 

  PUBLIC
DListBodyC::DListBodyC(void)
DListBodyC::~DListBodyC(void)
DListBodyC::Copy(void) const
DListBodyC::Empty(void)
DListBodyC::InsFirst(const DataT &)
DListBodyC::InsLast(const DataT &)
DListBodyC::PopFirst(void)
DListBodyC::PopLast(void)
DListBodyC::operator +=(const DataT &)
DListBodyC::operator +=(const DListC &)
DListBodyC::MoveFirst(DListC &)
DListBodyC::MoveLast(DListC &)
DListBodyC::MoveFirst(DLIterC &)
DListBodyC::MoveLast(DLIterC &)
DListBodyC::operator ==(const DListBodyC &) const
DListBodyC::operator !=(const DListBodyC &) const
DListBodyC::Contains(const DataT &)
DListBodyC::MergeSort(bool (*cmp)(const DataT & l1,const DataT & l2) )
DListBodyC::First(void)
DListBodyC::Last(void)
DListBodyC::First(void) const
DListBodyC::Last(void) const
DListBodyC::Del(const DataT &)
DLinkHeadC::IsEmpty(void) const
DLinkHeadC::Size(void) const
DLinkHeadC::Reverse(void)
DLinkHeadC::MergeSort(MergeSortInterCmpT,void *)
DLinkHeadC::Head(void)
RCBodyC::References(void) const
RCBodyC::Copy(void) const
RCBodyC::DeepCopy(UIntT) const
RCBodyC::IncRefCounter(void)
RCBodyC::DecRefCounter(void)

   DListBodyC<class DataT>   
 
Double linked list body.
 
include "Ravl/DList.hh"
User Level:Develop
Library:RavlCore
Example:exDList.cc
In Scope:RavlN

Comments:
Implementation:

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.

Parent Classes: Typedefs:
typedef bool (*MergeSortCmpT)(const DataT & l1,const DataT & l2) ;
Comparison function for merge sort.

Methods:
DListBodyC()
Default constructor.

~DListBodyC()
Destructor.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void Empty()
Empty the list of all contents

void InsFirst(const DataT & dat)
Insert element into the begining of the list.

void InsLast(const DataT & dat)
Insert element into the end of the list.

DataT PopFirst()
Pop item off beginning of this list.

DataT PopLast()
Pop item off end of list.

void operator +=(const DataT & dat)
Add 'dat' to end of this list.

void operator +=(const DListC<DataT> & dat)
Copy contents of other list to end of this one.

void MoveFirst(DListC<DataT> & lst)
Move the entire contents of 'lst' to the front of this one.
this leaves 'lst' empty.

void MoveLast(DListC<DataT> & lst)
Move the entire contents of 'lst' to the end of this one.
this leaves 'lst' empty.

void MoveFirst(DLIterC<DataT> & at)
Move the single item 'at' to the front of this list.
Leaves iterator pointing to the previous element.

void MoveLast(DLIterC<DataT> & at)
Move the single item 'at' to the end of this list.
Leaves iterator pointing to the previous element.

bool operator ==(const DListBodyC<DataT> & oth) const
Test if lists are identical.
assumes '==' is defined for 'DataT'

bool operator !=(const DListBodyC<DataT> & oth) const
Test if lists are different.
assumes '==' is defined for 'DataT'

bool Contains(const DataT & x)
Test if this list contains an element == to 'x'.

void MergeSort(bool (*cmp)(const DataT & l1,const DataT & l2) )
Merge sort the list with comparison function 'cmp'.

DataT & First()
Get first element in list.
Note, list MUST be non-empty.

DataT & Last()
Get last element in list.
Note, list MUST be non-empty.

const DataT & First() const
Get first element in list.
Note, list MUST be non-empty.

const DataT & Last() const
Get last element in list.
Note, list MUST be non-empty.

bool Del(const DataT & x)
Remove first instance of 'x' found in list.
returns true if the item is found and removed, false otherwise.

#include "Ravl/DLink.hh"
bool IsEmpty() const
Is list empty ?

UIntT Size() const
Count the number of elements in the list.
This is of order N, where N is the number of elements in the list.

void Reverse()
Reverse the order of the list.
This is of order N, where N is the number of elements in the list.

void MergeSort(MergeSortInterCmpT ms,void * pass = 0)
Merge sort the list using given comparison function.

DLinkC & Head()
Get head of list.

#include "Ravl/RefCounter.hh"
UIntT References() const
Access count of handles open to this object.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void IncRefCounter()
Increment reference counter.

bool DecRefCounter()
Decrement reference counter.


Maintainer:Radek Marik, Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002