Gaudi Framework, version v20r2

Generated: 18 Jul 2008

ObjectContainerBase Class Reference

#include <GaudiKernel/ObjectContainerBase.h>

Inheritance diagram for ObjectContainerBase:

Inheritance graph
[legend]
Collaboration diagram for ObjectContainerBase:

Collaboration graph
[legend]
List of all members.

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 20 of file ObjectContainerBase.h.

Public Member Functions

virtual long index (const ContainedObject *obj) const =0
 Distance of a given object from the beginning of its container.
virtual ContainedObjectcontainedObject (long dist) const =0
 Pointer to an object of a given distance.
virtual long 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.


Constructor & Destructor Documentation

ObjectContainerBase::ObjectContainerBase (  )  [inline, protected]

Constructor.

Definition at line 25 of file ObjectContainerBase.h.

00025 { }

virtual ObjectContainerBase::~ObjectContainerBase (  )  [inline, protected, virtual]

Destructor.

Definition at line 28 of file ObjectContainerBase.h.

00028 { }


Member Function Documentation

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 >, and ObjectVector< TYPE >.

Referenced by ContainedObject::index().

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

Pointer to an object of a given distance.

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

Referenced by Objects::access(), and SmartRefBase::accessData().

virtual long ObjectContainerBase::numberOfObjects (  )  const [pure virtual]

Number of objects in the container.

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

Referenced by StoreExplorerAlg::printObj().

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 >, and ObjectVector< 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 >, and ObjectVector< TYPE >.

Referenced by ContainedObject::~ContainedObject(), and KeyedObject< KEY >::~KeyedObject().


The documentation for this class was generated from the following file:
Generated at Fri Jul 18 12:08:43 2008 for Gaudi Framework, version v20r2 by Doxygen version 1.5.1 written by Dimitri van Heesch, © 1997-2004