Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Lists - IntrDListC<class DataT>
 

  PUBLIC
IntrDListC::IntrDListC(bool)
IntrDListC::IntrDListC(const IntrDListC &)
IntrDListC::operator =(const IntrDListC &)
IntrDListC::~IntrDListC(void)
IntrDListC::Empty(void)
IntrDListC::First(void)
IntrDListC::Last(void)
IntrDListC::First(void) const
IntrDListC::Last(void) const
IntrDListC::InsFirst(DataT &)
IntrDListC::InsLast(DataT &)
IntrDListC::PopFirst(void)
IntrDListC::PopLast(void)
IntrDListC::DelFirst(void)
IntrDListC::DelLast(void)
IntrDListC::Delete(DLinkC &)
IntrDListC::Head(void)
IntrDListC::Head(void) const
DLinkHeadC::IsEmpty(void) const
DLinkHeadC::Size(void) const
DLinkHeadC::Reverse(void)
DLinkHeadC::MergeSort(MergeSortInterCmpT,void *)
DLinkHeadC::Head(void)
DLinkHeadC::Head(void) const
DLinkHeadC::InsFirst(DLinkC &)
DLinkHeadC::InsLast(DLinkC &)
DLinkHeadC::MoveFirst(DLinkHeadC &)
DLinkHeadC::MoveLast(DLinkHeadC &)
DLinkHeadC::MoveFirst(DLinkC &)
DLinkHeadC::MoveLast(DLinkC &)
DLinkHeadC::MergeSortInternal(DLinkC **,UIntT,MergeSortInterCmpT,void *)

   IntrDListC<class DataT>   
 
Double-linked circular list
 
include "Ravl/InDList.hh"
Source file:Ravl/Core/Container/DList/InDList.hh
User Level:Advanced
Library:RavlCore
In Scope:RavlN

Comments:
The IntrDListC class represents intrusive 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 more complex dynamic structures as graphs.

NB. This is a SMALL object.

Parent Classes: Derived Classes: Variables:
bool deleteEntries;
Delete entries when finished with them ?

Methods:
IntrDListC(bool ndeleteEntries = true)
Construct an empty list.

IntrDListC(const IntrDListC<DataT> & oth)
Copy constructor.
This makes a copy of each entry in the list.

NB. This will only work on intrinsic lists which manage the destruction of there own entries. i.e. deleteEntries is true.


const IntrDListC<DataT> & operator =(const IntrDListC<DataT> & oth)
Assignment.
The contents of this list are replaced by a copy of the contents of 'oth'. NB. This will only work on intrinsic lists which manage the destruction of there own entries. i.e. deleteEntries is true.

~IntrDListC()
Destructor, each list element is destroyed.

void Empty()
Empty the list of all contents
---------- Access to the elements -----------------------------

DataT & First()
Get first link in list.

DataT & Last()
Get the last ilink in the list.

const DataT & First() const
Get first link in list.

const DataT & Last() const
Get the last ilink in the list.
---------- Elementary changes in the list -------------

void InsFirst(DataT & dat)
Push element onto the begining of the list.

void InsLast(DataT & dat)
Push element onto the end of the list.

DataT & PopFirst()
Pop item off front of list.
It is up to the user to ensure the object is deleted.

DataT & PopLast()
Pop item off back of list.
It is up to the user to ensure the object is deleted.

void DelFirst()
Pop item off front of list.
It is up to the user to ensure the object is deleted.

void DelLast()
Pop item off back of list.
It is up to the user to ensure the object is deleted.

static void Delete(DLinkC & elm)
Unlink and delete an element from the list.

DLinkC & Head()
Get head of list.

const DLinkC & Head() const
Get head of list.

#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.

const DLinkC & Head() const
Get head of list.

void InsFirst(DLinkC & dat)
Push element onto the begining of the list.

void InsLast(DLinkC & dat)
Push element onto the begining of the list.

void MoveFirst(DLinkHeadC & lst)
Move the entire contents of 'lst' to the front of this one.
this leaves 'lst' empty.

void MoveLast(DLinkHeadC & lst)
Move the entire contents of 'lst' to the back of this one.
this leaves 'lst' empty.

void MoveFirst(DLinkC & at)
Move the item 'at' to the front of this list

void MoveLast(DLinkC & at)
Move the item 'at' to the back of this list

DLinkC ** MergeSortInternal(DLinkC ** chead,UIntT n,MergeSortInterCmpT ms,void * pass)
Merge sort the list using given comparison function.


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