Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ObjectContainerBase Class Reference

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

#include <GaudiKernel/ObjectContainerBase.h>

Inheritance diagram for ObjectContainerBase:

DataObject IInspectable ObjectList ObjectVector List of all members.

Public Methods

virtual StatusCode release (ContainedObject* value) = 0
 Release object from the container (the pointer will be removed from the container, but the object itself will remain alive).

virtual unsigned long release ()
 Release reference to object (from DataObject) Re-implementing it here avoids a compiler warning about hidden function. Refer to ARM Page 210. More...

virtual long distance ( const ContainedObject* obj ) const = 0
 Distance of a given object from the beginning of its container.

virtual ContainedObjectcontainedObject ( long dist ) = 0
 Pointer to an object of a given distance.

virtual const ContainedObjectcontainedObject ( long dist ) const = 0
virtual long numberOfObjects () const = 0
 Number of objects in the container.

virtual void add (ContainedObject* pObject) = 0
 Virtual functions (forwards to the concrete container definitions) Add an object to the container.

virtual StreamBufferserialize ( StreamBuffer& s ) const
 Serialize the object for writing. More...

virtual StreamBufferserialize ( StreamBuffer& s )
 Serialize the object for reading. More...

virtual std::ostream& fillStream ( std::ostream& s ) const
 Fill the output stream (ASCII). More...


Protected Methods

 ObjectContainerBase ( const char* name = "unknown" )
 Constructors. More...

virtual ~ObjectContainerBase ()
 Destructor. More...


Friends

std::ostream& operator<< ( std::ostream& s, const ObjectContainerBase& obj )
 Output operator(ASCII). 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 (distance) in the container.

Author(s):
Pavel Binko , Pere Mato

Definition at line 24 of file ObjectContainerBase.h.


Constructor & Destructor Documentation

ObjectContainerBase::ObjectContainerBase ( const char * name = "unknown" ) [inline, protected]
 

Constructors.

Definition at line 28 of file ObjectContainerBase.h.

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

Destructor.

Definition at line 31 of file ObjectContainerBase.h.


Member Function Documentation

void ObjectContainerBase::add ( ContainedObject * pObject ) [pure virtual]
 

Virtual functions (forwards to the concrete container definitions) Add an object to the container.

Reimplemented in ObjectList, and ObjectVector.

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

Reimplemented in ObjectList, and ObjectVector.

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

Pointer to an object of a given distance.

Reimplemented in ObjectList, and ObjectVector.

Referenced by SmartRefBase::accessData().

long ObjectContainerBase::distance ( const ContainedObject * obj ) const [pure virtual]
 

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

Reimplemented in ObjectList, and ObjectVector.

Referenced by ContainedObject::distance().

std::ostream & ObjectContainerBase::fillStream ( std::ostream & s ) const [inline, virtual]
 

Fill the output stream (ASCII).

Reimplemented in ObjectList, and ObjectVector.

Definition at line 74 of file ObjectContainerBase.h.

Referenced by ObjectVector::fillStream(), ObjectList::fillStream(), and operator<<().

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

Number of objects in the container.

Reimplemented in ObjectList, and ObjectVector.

unsigned long ObjectContainerBase::release ( ) [inline, virtual]
 

Release reference to object (from DataObject) Re-implementing it here avoids a compiler warning about hidden function. Refer to ARM Page 210.

Reimplemented from DataObject.

Reimplemented in ObjectList, and ObjectVector.

Definition at line 42 of file ObjectContainerBase.h.

Referenced by ObjectVector::release(), ObjectList::release(), and ContainedObject::~ContainedObject().

StatusCode ObjectContainerBase::release ( ContainedObject * value ) [pure virtual]
 

Release object from the container (the pointer will be removed from the container, but the object itself will remain alive).

Reimplemented in ObjectList, and ObjectVector.

StreamBuffer & ObjectContainerBase::serialize ( StreamBuffer & s ) [inline, virtual]
 

Serialize the object for reading.

Reimplemented from DataObject.

Definition at line 64 of file ObjectContainerBase.h.

StreamBuffer & ObjectContainerBase::serialize ( StreamBuffer & s ) const [inline, virtual]
 

Serialize the object for writing.

Reimplemented from DataObject.

Definition at line 59 of file ObjectContainerBase.h.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream & s,
const ObjectContainerBase & obj ) [friend]
 

Output operator(ASCII).

Definition at line 70 of file ObjectContainerBase.h.


The documentation for this class was generated from the following file:
Generated at Wed Nov 21 12:22:14 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000