|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Parent Classes:
Variables:
- KNodeC * head;
-
Methods:
- KListC()
-
Null Constructor
- KListC(const KListC & s)
-
Copy constructor
- KListC<T> & operator=(const KListC<T> & s)
-
Assignment
- void Destruct()
-
- ~KListC()
-
Destructor
Speed critical operations
-------------------------
- KIterC InsAfter(const KIterC & it,const T & d)
-
Insert data after present position, returns iterator to new element
- KIterC InsBefore(const KIterC & it,const T & d)
-
Insert data before present position, returns iterator to new element
- KIterC InsFirst(const T & d)
-
Insert data d just after header, returns iterator to new element
- KIterC InsLast(const T & d)
-
Insert data d just before header, returns iterator to new element
- KListC<T> & Delete(KIterC & it)
-
delete needing only an iterator, a test for == head is made and if nonhead
iterator it is advanced to point to element after deleted element
- KListC<T> & DeleteFirst()
-
delete first element if exists
- KListC<T> & DeleteLast()
-
delete last element if exists
- KListC<T> & MovetoEnd(KIterC & it)
-
moves data elements pointed to by "it" to end of list
Iterator Stuff
--------------
- T & operator[](int n)
-
access to Nth element
- KIterC Nth(int n)
-
Make iterator point to n'th element, points to header if n too large
The first element is number 1 not 0
- int IsEmpty()
-
TRUE if empty
- int Size()
-
returns the number of elements
- int N()
-
returns the number of elements
Etc
---
- int FindPos(T & d)
-
returns the integer position of the element in the list, 0 if not there
- int RemoveElement(T & d)
-
Removes the first element == d, returns 1==success, 0==failure
- KListC<T> & Append(KListC<T> & b)
-
Append list b to this and return this, b is not affected
- KListC<T> Copy()
-
Make a new copy
- void Sort(ScopePath (*)(FuncArgList) Val)
-
sorts according to Val into ascending order.
- BooleanT ToBeDeleted() const
-
Returns TRUE if the content should be deleted.
- RCCountT Count() const
-
Returns the number of refrences to this object.
NB. The following definition is now obsolete,
The value 0 means there is no other reference to this object.
- BooleanT IsSingleReference()
-
Tests is there is only one reference to this object.
- const RefCounterC & operator=(const RefCounterC & rC)
-
- BooleanT ToBeDeletedUpdate(const RefCounterC & rC)
-
This function is the condition and the assigment together.
It returns TRUE if the content should be deleted before
assigning of the new object. The function automatically solves
the reference counter of this object as well as the other object
reference counter 'rC'.
- void ReportInvalidObject(char * Msg = 0)
-
This function reports an error to the user if a problem is detected
in the refrence counting mechanism.
- LabelT Label() const
-
Returns the label of this reference counter.
The member function
is useful mainly to recognize objects during debugging.
The value of the label is uniquely defined pointer.
|
Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|