#include <GaudiKernel/ObjectContainerBase.h>
Inheritance diagram for ObjectContainerBase:
inline code of class DataObject | |
void | setRegistry (IRegistry *pRegistry) |
Set pointer to Registry. | |
IRegistry * | registry () const |
Get pointer to Registry. | |
LinkManager * | linkMgr () const |
Retrieve Link manager. | |
unsigned char | version () const |
Retrieve version number of this object representation. | |
void | setVersion (unsigned char vsn) |
Set version number of this object representation. | |
unsigned long | refCount () const |
Return the refcount. | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the output stream (ASCII). | |
std::ostream & | operator<< (std::ostream &s, const DataObject &obj) |
Output operator (ASCII). | |
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). | |
virtual unsigned long | addRef () |
Add reference to object. | |
virtual unsigned long | release () |
release reference to object | |
virtual const CLID & | clID () const |
Retrieve reference to class definition structure. | |
const std::string & | name () const |
Retreive DataObject name. It is the name when registered in the store. | |
virtual StreamBuffer & | serialize (StreamBuffer &s) |
Serialization mechanism: Serialize the object for reading. | |
virtual StreamBuffer & | serialize (StreamBuffer &s) const |
Serialization mechanism: Serialize the object for writing. | |
Static Public Member Functions | |
static const CLID & | classID () |
Retrieve reference to class definition structure (static access). | |
Protected Member Functions | |
ObjectContainerBase () | |
Constructor. | |
virtual | ~ObjectContainerBase () |
Destructor. |
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.
Pere Mato
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::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 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 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::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 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 >.
virtual unsigned long DataObject::addRef | ( | ) | [virtual, inherited] |
Add reference to object.
virtual unsigned long DataObject::release | ( | ) | [virtual, inherited] |
release reference to object
virtual const CLID& DataObject::clID | ( | ) | const [virtual, inherited] |
Retrieve reference to class definition structure.
Reimplemented in AlgorithmHistory, AlgToolHistory, DataHistory, HistoryObj, JobHistory, KeyedContainer< DATATYPE, MAPPING >, NTuple::Directory, NTuple::File, NTuple::ColumnWiseTuple, NTuple::RowWiseTuple, ObjectList< TYPE >, ObjectVector< TYPE >, RefTable1to1< FROM, TO >, RefTable1toN< FROM, TO >, ServiceHistory, and SharedObjectsContainer< TYPE >.
static const CLID& DataObject::classID | ( | ) | [static, inherited] |
Retrieve reference to class definition structure (static access).
Reimplemented in AlgorithmHistory, AlgToolHistory, DataHistory, HistoryObj, JobHistory, KeyedContainer< DATATYPE, MAPPING >, NTuple::Directory, NTuple::File, NTuple::ColumnWiseTuple, NTuple::RowWiseTuple, ObjectList< TYPE >, ObjectVector< TYPE >, ServiceHistory, and SharedObjectsContainer< TYPE >.
const std::string& DataObject::name | ( | ) | const [inherited] |
Retreive DataObject name. It is the name when registered in the store.
Reimplemented in NTuple::File, and ServiceHistory.
virtual StreamBuffer& DataObject::serialize | ( | StreamBuffer & | s | ) | [virtual, inherited] |
Serialization mechanism: Serialize the object for reading.
Reimplemented in RefTableBase< FROM, MAPENTRY >, RefTableBase< FROM, SmartRefVector< TO > >, and RefTableBase< FROM, SmartRef< TO > >.
virtual StreamBuffer& DataObject::serialize | ( | StreamBuffer & | s | ) | const [virtual, inherited] |
Serialization mechanism: Serialize the object for writing.
Reimplemented in RefTableBase< FROM, MAPENTRY >, RefTableBase< FROM, SmartRefVector< TO > >, and RefTableBase< FROM, SmartRef< TO > >.
void DataObject::setRegistry | ( | IRegistry * | pRegistry | ) | [inline, inherited] |
Set pointer to Registry.
Definition at line 67 of file DataObject.h.
00067 { 00068 m_pRegistry = pRegistry; 00069 }
IRegistry* DataObject::registry | ( | ) | const [inline, inherited] |
Get pointer to Registry.
Definition at line 71 of file DataObject.h.
00071 { 00072 return m_pRegistry; 00073 }
LinkManager* DataObject::linkMgr | ( | ) | const [inline, inherited] |
Retrieve Link manager.
Definition at line 75 of file DataObject.h.
00075 { 00076 return m_pLinkMgr; 00077 }
unsigned char DataObject::version | ( | ) | const [inline, inherited] |
Retrieve version number of this object representation.
Definition at line 79 of file DataObject.h.
00079 { 00080 return m_version; 00081 }
void DataObject::setVersion | ( | unsigned char | vsn | ) | [inline, inherited] |
Set version number of this object representation.
Definition at line 83 of file DataObject.h.
00083 { 00084 m_version = vsn; 00085 }
unsigned long DataObject::refCount | ( | ) | const [inline, inherited] |
Return the refcount.
Definition at line 87 of file DataObject.h.
00087 { 00088 return m_refCount; 00089 }
virtual std::ostream& DataObject::fillStream | ( | std::ostream & | s | ) | const [inline, virtual, inherited] |
Fill the output stream (ASCII).
Reimplemented in ObjectList< TYPE >, and ObjectVector< TYPE >.
Definition at line 91 of file DataObject.h.
std::ostream& operator<< | ( | std::ostream & | s, | |
const DataObject & | obj | |||
) | [friend, inherited] |
Output operator (ASCII).
Definition at line 96 of file DataObject.h.
00096 { 00097 return obj.fillStream(s); 00098 }