#include <DpListBin_Type.h>
Public Methods | |
| DpListBin(Type) (;) DpListBin(Type(const) DpListBin(Type) &list_) | |
| ~DpListBin(Type) (;) inline const DpListBin(Type) &operator=(const DpListBin(Type) &list_) | |
| void | add (const Type *item) |
| Type* | remove (const long int id) |
| Type* | remove (const Type *item) |
| int | size () const |
| Type* | getItem (const long int id) const |
| Type* | getItemBefore (const long int id) const |
| Type* | operator[] (const int i) const |
NAME: DpListBin(Type) - binary sorted list of class objects
DESCRIPTION:
This class implements a macro template for a binary sorted list of class objects. The classes that can be sorted must implement a member
int getId() const;
|
|
|
|
|
|
|
|
add a new item to the list. |
|
|
return a pointer to the item with the given id, or NULL if not found. |
|
|
return a pointer to the item in the list with the largest id, less then or equal to the given id, or NULL if not found. |
|
|
|
|
|
See documentation of one of the overloaded functions. |
|
|
One version removes the item with supplied id, the other version of this function removes a specified object from the list. A pointer to the removed item is returned from the function. |
|
|
returns the number of items in the list. |