SALOME - SMESH
|
Purpose: NCollection_BaseCollection is the base abstract class for all collection templates of this package. More...
#include <NCollection_BaseCollection.hxx>
Data Structures | |
class | Iterator |
Public Member Functions | |
NCollection_BaseCollection (const Handle(NCollection_BaseAllocator)&theAllocator=0L) | |
Common for all collections constructor takes care of theAllocator. More... | |
virtual Standard_Integer | Size (void) const =0 |
Number of items. More... | |
virtual void | Assign (const NCollection_BaseCollection &theOther)=0 |
Virtual assignment. More... | |
virtual Iterator & | CreateIterator (void) const =0 |
Method to create iterators for base collections. More... | |
virtual | ~NCollection_BaseCollection (void) |
Destructor - must be implemented to release the memory. More... | |
const | Handle (NCollection_BaseAllocator) &Allocator() const |
Returns attached allocator. More... | |
Protected Member Functions | |
const | Handle (NCollection_BaseAllocator) &IterAllocator(void) const |
void | exchangeAllocators (NCollection_BaseCollection &theOther) |
Exchange allocators of two collections. More... | |
Handle (NCollection_BaseAllocator) myAllocator | |
Private Member Functions | |
Handle (NCollection_BaseAllocator) myIterAllocator | |
Purpose: NCollection_BaseCollection is the base abstract class for all collection templates of this package.
The set of collections is similar to that of TCollection. Also the methods of classes have mostly the same names for easy switch from TCollection <-> NCollection containers.
NCollection is a nocdlpack, thus it is compiled without WOK. BaseCollection allows assigning the collections of different kinds (the items type being the same) with a few obvious exclusions - one can not assign any collection to the map having double data (two keys or a key plus value). Only the maps of the very same type may be assigned through operator= Said maps are: DoubleMap, DataMap, IndexedDataMap
For the users needing control over the memory usage the allocators were added (see NCollection_BaseAllocator header) Others may forget it - BaseAllocator is used by default and then memory is managed through Standard::Allocate/::Free.
Definition at line 44 of file NCollection_BaseCollection.hxx.
NCollection_BaseCollection< TheItemType >::NCollection_BaseCollection | ( | const Handle(NCollection_BaseAllocator)& | theAllocator = 0L | ) |
Common for all collections constructor takes care of theAllocator.
Definition at line 79 of file NCollection_BaseCollection.hxx.
|
virtual |
Destructor - must be implemented to release the memory.
Definition at line 98 of file NCollection_BaseCollection.hxx.
|
pure virtual |
Number of items.
|
pure virtual |
Virtual assignment.
|
pure virtual |
Method to create iterators for base collections.
const NCollection_BaseCollection< TheItemType >::Handle | ( | NCollection_BaseAllocator | ) | const & |
Returns attached allocator.
Definition at line 101 of file NCollection_BaseCollection.hxx.
|
protected |
Definition at line 105 of file NCollection_BaseCollection.hxx.
|
protected |
Exchange allocators of two collections.
Definition at line 114 of file NCollection_BaseCollection.hxx.
|
protected |
|
private |