#include <dict.h>
Inheritance diagram for PAbstractSet:
Public Member Functions | |
Construction | |
PINLINE | PAbstractSet () |
Overrides from class PCollection | |
virtual PINDEX | Append (PObject *obj) |
virtual PINDEX | Insert (const PObject &before, PObject *obj) |
virtual PINDEX | InsertAt (PINDEX index, PObject *obj) |
virtual BOOL | Remove (const PObject *obj) |
virtual PObject * | RemoveAt (PINDEX index) |
virtual PObject * | GetAt (PINDEX index) const |
virtual BOOL | SetAt (PINDEX index, PObject *val) |
virtual PINDEX | GetObjectsIndex (const PObject *obj) const |
virtual PINDEX | GetValuesIndex (const PObject &obj) const |
|
Create a new, empty, set. Note that by default, objects placed into the list will be deleted when removed or when all references to the list are destroyed. |
|
Add a new object to the collection. If the objects value is already in the set then the object is { not} included. If the AllowDeleteObjects# option is set then the #obj# parameter is also deleted.
Implements PCollection. |
|
This function is the same as PHashTable::AbstractGetKeyAt().
Implements PCollection. |
|
Search the collection for the specific instance of the object. The object pointers are compared, not the values. The hash table is used to locate the entry. Note that that will require value comparisons to be made to find the equivalent entry and then a final check is made with the pointers to see if they are the same instance.
Implements PCollection. |
|
Search the collection for the specified value of the object. The object values are compared, not the pointers. So the objects in the collection must correctly implement the PObject::Compare()# function. The hash table is used to locate the entry.
Implements PCollection. |
|
Add a new object to the collection. If the objects value is already in the set then the object is { not} included. If the AllowDeleteObjects option is set then the #obj# parameter is also deleted. The object is always placed in the an ordinal position dependent on its hash function. It is not placed at the specified position. The #before# parameter is ignored.
Implements PCollection. |
|
Add a new object to the collection. If the objects value is already in the set then the object is { not} included. If the AllowDeleteObjects option is set then the #obj# parameter is also deleted. The object is always placed in the an ordinal position dependent on its hash function. It is not placed at the specified position. The #index# parameter is ignored.
Implements PCollection. |
|
Remove the object from the collection. If the AllowDeleteObjects option is set then the object is also deleted. Note that the comparison for searching for the object in collection is made by pointer, not by value. Thus the parameter must point to the same instance of the object that is in the collection.
Implements PCollection. |
|
Remove an object at the specified index. If the AllowDeleteObjects# option is set then the object is also deleted.
Implements PCollection. |
|
Add a new object to the collection. If the objects value is already in the set then the object is { not} included. If the AllowDeleteObjects option is set then the #obj# parameter is also deleted. The object is always placed in the an ordinal position dependent on its hash function. It is not placed at the specified position. The #index# parameter is ignored.
Implements PCollection. |