#include <collection.h>
Inheritance diagram for Collection:

Public Methods | |
| Collection (void) | |
| A constructor. More... | |
| virtual void | clear (void)=0 |
| Clear contents of the collection. More... | |
| virtual size_t | count (void) |
| Return the number of items in the collection. More... | |
| virtual bool | isEmpty (void) |
| Test whether the collection is empty. More... | |
| virtual void | setAutoDelete (bool ad) |
| Set auto delete flag. More... | |
Protected Methods | |
| virtual void | init_ (void) |
| Initialization of the collection. | |
Protected Attributes | |
| size_t | cnt_ |
| Number of items in the collection. | |
| bool | autoDelete_ |
| Auto deletion flag. | |
Inherit this class whenever you intend to create a new collection type.
Definition at line 36 of file collection.h.
|
||||||||||
|
A constructor.
Calls init_() Definition at line 44 of file collection.h. |
|
||||||||||
|
Clear contents of the collection.
Behaviour is dependend on auto deletion flag. If auto deletion is enabled, the memory occupied by the items in the collection will be freed; otherwise it will be preserved.
Implemented in HashTable. |
|
||||||||||
|
Return the number of items in the collection.
Definition at line 60 of file collection.h. |
|
||||||||||
|
Test whether the collection is empty.
Definition at line 68 of file collection.h. Referenced by ElementModelEntropyCalculator::calculate, and main. |
|
||||||||||
|
Set auto delete flag.
If auto deletion is enabled, the memory occupied by the items in the collection will be freed when they are removed from the collection; otherwise they will be preserved. Auto deletion is implicitly disabled.
Reimplemented in HashTable. Definition at line 79 of file collection.h. Referenced by ElementModelEntropyCalculator::calculate. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002