#include <lists.h>
Public Member Functions | |
Construction | |
PSortedList () | |
Overrides from class PObject | |
virtual PObject * | Clone () const |
New functions for class | |
T & | operator[] (PINDEX index) const |
Protected Member Functions | |
PSortedList (int dummy, const PSortedList *c) |
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.
Referenced by PSortedList< T >::Clone().
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.
References PNEW, and PSortedList< T >::PSortedList().
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.
References PAbstractSortedList::GetAt().