| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | List of all members
ObjectContainerBase Class Referenceabstract

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

`#include <GaudiKernel/ObjectContainerBase.h>`

Inheritance diagram for ObjectContainerBase:
[legend]
Collaboration diagram for ObjectContainerBase:
[legend]

## 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 ContainedObject * | containedObject (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...
DataObject & | operator= (const DataObject &rhs)
| Assignment Operator. More...
| DataObject (DataObject &&rhs)
| Move Constructor. More...
DataObject & | operator= (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 CLID & | clID () const
| Retrieve reference to class definition structure. More...
const std::string & | name () 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...
IRegistry * | registry () const
| Get pointer to Registry. More...
LinkManager * | linkMgr () 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::ostream & | fillStream (std::ostream &s) const
| Fill the output stream (ASCII) More...

## Protected Member Functions
| ObjectContainerBase ()=default
| Constructor. More...
| ObjectContainerBase (ObjectContainerBase &&)=default
ObjectContainerBase & | operator= (ObjectContainerBase &&)=default

## Additional Inherited Members
Static Public Member Functions inherited from DataObject
static const CLID & | classID ()
| 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

typedef size_t ObjectContainerBase::size_type

size_type, to conform the STL container interface

Definition at line 30 of file ObjectContainerBase.h.

## Constructor & Destructor Documentation

ObjectContainerBase::ObjectContainerBase | ( |  | ) |
| protected default

Constructor.

ObjectContainerBase::ObjectContainerBase | ( | ObjectContainerBase && |  | ) |
| protected default

## 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

Number of objects in the container.

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

ObjectContainerBase& ObjectContainerBase::operator= | ( | ObjectContainerBase && |  | ) |
| protected default

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:

- GaudiKernel/GaudiKernel/ObjectContainerBase.h