The Gaudi Framework  v30r3 (a5ef0a68)
ObjectContainerBase Class Referenceabstract

ObjectContainerBase is the base class for Gaudi container classes. More...

#include <GaudiKernel/ObjectContainerBase.h>

Inheritance diagram for ObjectContainerBase:
Collaboration diagram for ObjectContainerBase:

Public Types

typedef size_t size_type
 size_type, to conform the STL container interface More...
 

Public Member Functions

virtual long index (const ContainedObject *obj) const =0
 Distance of a given object from the beginning of its container. More...
 
virtual ContainedObjectcontainedObject (long dist) const =0
 Pointer to an object of a given distance. More...
 
virtual size_type numberOfObjects () const =0
 Number of objects in the container. More...
 
virtual long add (ContainedObject *pObject)=0
 Virtual functions (forwards to the concrete container definitions) Add an object to the container. More...
 
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). More...
 
- Public Member Functions inherited from DataObject
 DataObject ()
 Standard Constructor. More...
 
 DataObject (const DataObject &rhs)
 Copy Constructor. More...
 
DataObjectoperator= (const DataObject &rhs)
 Assignment Operator. More...
 
 DataObject (DataObject &&rhs)
 Move Constructor. More...
 
DataObjectoperator= (DataObject &&rhs)
 Move Assignment Operator. More...
 
virtual ~DataObject ()
 Standard Destructor. More...
 
virtual unsigned long addRef ()
 Add reference to object. More...
 
virtual unsigned long release ()
 release reference to object More...
 
virtual const CLIDclID () const
 Retrieve reference to class definition structure. More...
 
const std::stringname () const
 Retreive DataObject name. It is the name when registered in the store. More...
 
virtual StatusCode update ()
 Provide empty placeholder for internal object reconfiguration callback. More...
 
void setRegistry (IRegistry *pRegistry)
 Set pointer to Registry. More...
 
IRegistryregistry () const
 Get pointer to Registry. More...
 
LinkManagerlinkMgr () const
 Retrieve Link manager. More...
 
unsigned char version () const
 Retrieve version number of this object representation. More...
 
void setVersion (unsigned char vsn)
 Set version number of this object representation. More...
 
unsigned long refCount () const
 Return the refcount. More...
 
virtual std::ostreamfillStream (std::ostream &s) const
 Fill the output stream (ASCII) More...
 

Protected Member Functions

 ObjectContainerBase ()=default
 Constructor. More...
 
 ObjectContainerBase (ObjectContainerBase &&)=default
 
ObjectContainerBaseoperator= (ObjectContainerBase &&)=default
 

Additional Inherited Members

- Static Public Member Functions inherited from DataObject
static const CLIDclassID ()
 Retrieve reference to class definition structure (static access) More...
 

Detailed Description

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.

Author
Pavel Binko
Pere Mato

Definition at line 19 of file ObjectContainerBase.h.

Member Typedef Documentation

size_type, to conform the STL container interface

Definition at line 30 of file ObjectContainerBase.h.

Constructor & Destructor Documentation

ObjectContainerBase::ObjectContainerBase ( )
protecteddefault

Constructor.

ObjectContainerBase::ObjectContainerBase ( ObjectContainerBase &&  )
protecteddefault

Member Function Documentation

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 SharedObjectsContainer< TYPE >, KeyedContainer< DATATYPE, MAPPING >, ObjectVector< TYPE >, and ObjectList< TYPE >.

virtual ContainedObject* ObjectContainerBase::containedObject ( long  dist) const
pure virtual

Pointer to an object of a given distance.

Implemented in SharedObjectsContainer< TYPE >, KeyedContainer< DATATYPE, MAPPING >, ObjectVector< TYPE >, and ObjectList< TYPE >.

virtual long ObjectContainerBase::index ( const ContainedObject obj) const
pure virtual

Distance of a given object from the beginning of its container.

Implemented in SharedObjectsContainer< TYPE >, KeyedContainer< DATATYPE, MAPPING >, ObjectVector< TYPE >, and ObjectList< TYPE >.

virtual size_type ObjectContainerBase::numberOfObjects ( ) const
pure virtual
ObjectContainerBase& ObjectContainerBase::operator= ( ObjectContainerBase &&  )
protecteddefault
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 SharedObjectsContainer< TYPE >, KeyedContainer< DATATYPE, MAPPING >, ObjectVector< TYPE >, and ObjectList< TYPE >.


The documentation for this class was generated from the following file: