|
Gaudi Framework, version v23r2 |
| Home | Generated: Thu Jun 28 2012 |
ObjectContainerBase is the base class for Gaudi container classes. More...
#include <GaudiKernel/ObjectContainerBase.h>


Public Types | |
| typedef size_t | size_type |
| size_type, to conform the STL container interface | |
Public Member Functions | |
| virtual long | index (const ContainedObject *obj) const =0 |
| Distance of a given object from the beginning of its container. | |
| virtual ContainedObject * | containedObject (long dist) const =0 |
| Pointer to an object of a given distance. | |
| virtual size_type | numberOfObjects () const =0 |
| Number of objects in the container. | |
| virtual long | add (ContainedObject *pObject)=0 |
| Virtual functions (forwards to the concrete container definitions) Add an object to the container. | |
| virtual long | remove (ContainedObject *value)=0 |
| Release object from the container (the pointer will be removed from the container, but the object itself will remain alive). | |
Protected Member Functions | |
| ObjectContainerBase () | |
| Constructor. | |
| virtual | ~ObjectContainerBase () |
| Destructor. | |
ObjectContainerBase is the base class for Gaudi container classes.
The main motivation is to allow contained object to be removed from the container on deletion and also for knowing it own index (e.g. distance, key, ...) in the container.
Definition at line 20 of file ObjectContainerBase.h.
| typedef size_t ObjectContainerBase::size_type |
size_type, to conform the STL container interface
Reimplemented in SharedObjectsContainer< TYPE >.
Definition at line 33 of file ObjectContainerBase.h.
| ObjectContainerBase::ObjectContainerBase | ( | ) | [inline, protected] |
| virtual ObjectContainerBase::~ObjectContainerBase | ( | ) | [inline, protected, virtual] |
| virtual long ObjectContainerBase::add | ( | ContainedObject * | pObject ) | [pure virtual] |
Virtual functions (forwards to the concrete container definitions) Add an object to the container.
On success the object's index is returned.
Implemented in KeyedContainer< DATATYPE, MAPPING >, ObjectList< TYPE >, ObjectVector< TYPE >, and SharedObjectsContainer< TYPE >.
| virtual ContainedObject* ObjectContainerBase::containedObject | ( | long | dist ) | const [pure virtual] |
Pointer to an object of a given distance.
Implemented in KeyedContainer< DATATYPE, MAPPING >, ObjectList< TYPE >, ObjectVector< TYPE >, and SharedObjectsContainer< TYPE >.
| virtual long ObjectContainerBase::index | ( | const ContainedObject * | obj ) | const [pure virtual] |
Distance of a given object from the beginning of its container.
Implemented in KeyedContainer< DATATYPE, MAPPING >, ObjectList< TYPE >, ObjectVector< TYPE >, and SharedObjectsContainer< TYPE >.
| virtual size_type ObjectContainerBase::numberOfObjects | ( | ) | const [pure virtual] |
Number of objects in the container.
Implemented in KeyedContainer< DATATYPE, MAPPING >, ObjectList< TYPE >, ObjectVector< TYPE >, and SharedObjectsContainer< TYPE >.
| virtual long ObjectContainerBase::remove | ( | ContainedObject * | value ) | [pure virtual] |
Release object from the container (the pointer will be removed from the container, but the object itself will remain alive).
If the object was fount it's index is returned.
Implemented in KeyedContainer< DATATYPE, MAPPING >, ObjectList< TYPE >, ObjectVector< TYPE >, and SharedObjectsContainer< TYPE >.