#include <lists.h>
Inheritance diagram for PSortedList< T >:
Public Member Functions | |
Construction | |
PSortedList () | |
Create a new, empty, sorted list. | |
Overrides from class PObject | |
virtual PObject * | Clone () const |
Make a complete duplicate of the list. | |
New functions for class | |
T & | operator[] (PINDEX index) const |
Retrieve a reference to the object in the list. | |
Protected Member Functions | |
PSortedList (int dummy, const PSortedList *c) |
The functions in this class primarily do all the appropriate casting of types.
Note that if templates are not used the PDECLARE_SORTED_LIST
macro will simulate the template instantiation.
PSortedList< T >::PSortedList | ( | ) | [inline] |
Create a new, empty, sorted list.
Note that by default, objects placed into the list will be deleted when removed or when all references to the list are destroyed.
PSortedList< T >::PSortedList | ( | int | dummy, | |
const PSortedList< T > * | c | |||
) | [inline, protected] |
virtual PObject* PSortedList< T >::Clone | ( | ) | const [inline, virtual] |
Make a complete duplicate of the list.
Note that all objects in the array are also cloned, so this will make a complete copy of the list.
Reimplemented from PObject.
T& PSortedList< T >::operator[] | ( | PINDEX | index | ) | const [inline] |
Retrieve a reference to the object in the list.
If there was not an object at that ordinal position or the index was beyond the size of the array then the function asserts.
The object accessed in this way is remembered by the class and further access will be fast.
index
position. index | Index for entry |