|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
It is faster to use plain PriQueueC if you know the
maximum size of the queue before its constructed.
Notes:
This is a BIG OBJECT.
Keys must have operation '<' defined.
This queue assumes: **** Small numbers == High priority. ****
The order in which items of equal priority are retrieved should
be treated as 'unknown'.
Parent Classes:
Variables:
- HeapNodeC * Root;
-
Methods:
- PriQueueLC()
-
Default constructor.
- PriQueueLC(const PriQueueLC<K,D> & Oth)
-
- ~PriQueueLC()
-
Destructor.
- PriQueueLC & operator=(const PriQueueLC<K,D> & Oth)
-
Assignment operator
- BooleanT IsElm(void) const
-
Does the queue contains any items ?
- BooleanT IsEmpty(void) const
-
Is the queue empty ?
- D & Top(void)
-
Look/Modify data on top of queue.
- const D & Top(void) const
-
Look at data on top of queue.
- const K & TopKey(void) const
-
Look at key on top of queue.
- void DelTop(void)
-
Delete item on top of queue.
NB. IsElm(), must be true before calling this.
- Tuple2C<K,D> & GetTopPair(void)
-
Get Key/Data pair from queue.
WARNING: For advanced users only.
!! Users responsability to delete returned info after use. !!
- D GetTop(void)
-
Get Data from top of queue.
- void Insert(const K & Key,const D & Data)
-
Insert Data/Key into queue.
- void Insert(Tuple2C<K,D> & New)
-
Insert Data/Key into queue.
- BooleanT Remove(const Tuple2C<K,D> & New)
-
Remove all instances of Key from queue.
Returns True if found.
BUG: NOT IMPLEMENTED
- BooleanT Remove(const K & Key)
-
Remove all instances of Key from queue.
Returns True if found.
BUG: NOT IMPLEMENTED
- int Size(void) const
-
Get number of items in queue. Slow !!!
- void Dump(HeapNodeC<K,D> * Place = 0,int level = 0)
-
Dump to stdout
- void Empty(void)
-
Empty the queue of all its contents.
- 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:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|