![]() |
The Gaudi Framework
v25r3
|
ObjectList is one of the basic Gaudi container classes capable of being registered in Data Stores. More...
#include <GaudiKernel/ObjectList.h>
Public Types | |
typedef TYPE | contained_type |
typedef std::list< TYPE * > ::value_type | value_type |
typedef std::list< TYPE * > ::reference | reference |
typedef std::list< TYPE * > ::const_reference | const_reference |
typedef std::list< TYPE * > ::iterator | iterator |
typedef std::list< TYPE * > ::const_iterator | const_iterator |
typedef std::list< TYPE * > ::reverse_iterator | reverse_iterator |
typedef std::list< TYPE * > ::const_reverse_iterator | const_reverse_iterator |
typedef std::vector< TYPE * > ::pointer | pointer |
typedef std::vector< TYPE * > ::const_pointer | const_pointer |
![]() | |
typedef size_t | size_type |
size_type, to conform the STL container interface More... | |
Public Member Functions | |
ObjectList () | |
Constructors. More... | |
ObjectList (const ObjectList< TYPE > &value) | |
Copy Constructor. More... | |
virtual | ~ObjectList () |
Destructor. More... | |
virtual const CLID & | clID () const |
Retrieve pointer to class definition structure. More... | |
ObjectList< TYPE >::iterator | begin () |
Return an iterator pointing to the beginning of the container. More... | |
ObjectList< TYPE >::const_iterator | begin () const |
Return a const_iterator pointing to the beginning of the container. More... | |
ObjectList< TYPE >::iterator | end () |
Return an iterator pointing to the end of the container. More... | |
ObjectList< TYPE >::const_iterator | end () const |
Return a const_iterator pointing to the end of the container. More... | |
ObjectList< TYPE > ::reverse_iterator | rbegin () |
Return a reverse_iterator pointing to the beginning of the reversed container. More... | |
ObjectList< TYPE > ::const_reverse_iterator | rbegin () const |
Return a const_reverse_iterator pointing to the beginning of the reversed container. More... | |
ObjectList< TYPE > ::reverse_iterator | rend () |
Return a reverse_iterator pointing to the end of the reversed container. More... | |
ObjectList< TYPE > ::const_reverse_iterator | rend () const |
Return a const_reverse_iterator pointing to the end of the reversed container. More... | |
ObjectList< TYPE >::size_type | size () const |
Return the size of the container Size means the number of objects stored in the container, independently on the amount of information stored in each object. More... | |
virtual ObjectList< TYPE > ::size_type | numberOfObjects () const |
The same as size(), return number of objects in the container. More... | |
ObjectList< TYPE >::size_type | max_size () const |
Return the largest possible size of the container. More... | |
bool | empty () const |
Return true if the size of the container is 0. More... | |
ObjectList< TYPE >::reference | front () |
Return reference to the first element. More... | |
ObjectList< TYPE >::const_reference | front () const |
Return const_reference to the first element. More... | |
ObjectList< TYPE >::reference | back () |
Return reference to the last element. More... | |
ObjectList< TYPE >::const_reference | back () const |
Return const_reference to the last element. More... | |
void | push_back (typename ObjectList< TYPE >::const_reference value) |
push_back = append = insert a new element at the end of the container More... | |
virtual long | add (ContainedObject *pObject) |
Add an object to the container. More... | |
void | pop_back () |
pop_back = remove the last element from the container The removed object will be deleted (see the method release) More... | |
virtual long | remove (ContainedObject *value) |
Release object from the container (the pointer will be removed from the container, but the object itself will remain alive) (see the method pop_back) More... | |
ObjectList< TYPE >::iterator | insert (typename ObjectList< TYPE >::iterator position, typename ObjectList< TYPE >::const_reference value) |
Insert "value" before "position". More... | |
void | erase (typename ObjectList< TYPE >::iterator position) |
Erase the object at "position" from the container. The removed object will be deleted. More... | |
void | erase (typename ObjectList< TYPE >::iterator first, typename ObjectList< TYPE >::iterator last) |
Erase the range [first, last) from the container. The removed object will be deleted. More... | |
void | clear () |
Clear the entire content of the container and delete all contained objects. More... | |
virtual long | index (const ContainedObject *obj) const |
Return distance of a given object from the beginning of its container It corresponds to the "index" ( from 0 to size()-1 ) If "obj" not fount, return -1. More... | |
virtual ContainedObject * | containedObject (long dist) const |
Return const pointer to an object of a given distance. More... | |
virtual std::ostream & | fillStream (std::ostream &s) const |
Fill the output stream (ASCII) More... | |
![]() | |
DataObject () | |
Standard Constructor. More... | |
DataObject (const DataObject &) | |
Copy Constructor. More... | |
virtual | ~DataObject () |
Standard Destructor. More... | |
virtual unsigned long | addRef () |
Add reference to object. More... | |
virtual unsigned long | release () |
release reference to object 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... | |
Static Public Member Functions | |
static const CLID & | classID () |
![]() | |
static const CLID & | classID () |
Retrieve reference to class definition structure (static access) More... | |
Private Attributes | |
std::list< TYPE * > | m_list |
The STL list. More... | |
Additional Inherited Members | |
![]() | |
ObjectContainerBase () | |
Constructor. More... | |
virtual | ~ObjectContainerBase () |
Destructor. More... | |
ObjectList is one of the basic Gaudi container classes capable of being registered in Data Stores.
It is based on Standard Library (STL) std::list (see STL Programmer's Guide) ObjectList has all functions of the std::list interface,
Each object is allowed to belong into a single container only. After inserting the object into the container, it takes over all responsibilities for the object. E.g. erasing the object from its container causes removing the object's pointer from the container and deleting the object itself.
Definition at line 13 of file ContainedObject.h.
typedef std::list<TYPE*>::const_iterator ObjectList< TYPE >::const_iterator |
Definition at line 48 of file ObjectList.h.
typedef std::vector<TYPE*>::const_pointer ObjectList< TYPE >::const_pointer |
Definition at line 58 of file ObjectList.h.
typedef std::list<TYPE*>::const_reference ObjectList< TYPE >::const_reference |
Definition at line 45 of file ObjectList.h.
typedef std::list<TYPE*>::const_reverse_iterator ObjectList< TYPE >::const_reverse_iterator |
Definition at line 51 of file ObjectList.h.
typedef TYPE ObjectList< TYPE >::contained_type |
Definition at line 41 of file ObjectList.h.
typedef std::list<TYPE*>::iterator ObjectList< TYPE >::iterator |
Definition at line 47 of file ObjectList.h.
typedef std::vector<TYPE*>::pointer ObjectList< TYPE >::pointer |
Definition at line 57 of file ObjectList.h.
typedef std::list<TYPE*>::reference ObjectList< TYPE >::reference |
Definition at line 44 of file ObjectList.h.
typedef std::list<TYPE*>::reverse_iterator ObjectList< TYPE >::reverse_iterator |
Definition at line 50 of file ObjectList.h.
typedef std::list<TYPE*>::value_type ObjectList< TYPE >::value_type |
Definition at line 42 of file ObjectList.h.
|
inline |
|
inline |
|
inlinevirtual |
Destructor.
Definition at line 70 of file ObjectList.h.
|
inlinevirtual |
Add an object to the container.
Implements ObjectContainerBase.
Definition at line 174 of file ObjectList.h.
|
inline |
|
inline |
|
inline |
Return an iterator pointing to the beginning of the container.
Definition at line 84 of file ObjectList.h.
|
inline |
Return a const_iterator pointing to the beginning of the container.
Definition at line 89 of file ObjectList.h.
|
inlinestatic |
Definition at line 78 of file ObjectList.h.
|
inline |
Clear the entire content of the container and delete all contained objects.
Definition at line 259 of file ObjectList.h.
|
inlinevirtual |
Retrieve pointer to class definition structure.
Reimplemented from DataObject.
Definition at line 75 of file ObjectList.h.
|
inlinevirtual |
Return const pointer to an object of a given distance.
Implements ObjectContainerBase.
Definition at line 278 of file ObjectList.h.
|
inline |
|
inline |
Return an iterator pointing to the end of the container.
Definition at line 94 of file ObjectList.h.
|
inline |
Return a const_iterator pointing to the end of the container.
Definition at line 99 of file ObjectList.h.
|
inline |
Erase the object at "position" from the container. The removed object will be deleted.
Definition at line 234 of file ObjectList.h.
|
inline |
Erase the range [first, last) from the container. The removed object will be deleted.
Definition at line 246 of file ObjectList.h.
|
inlinevirtual |
Fill the output stream (ASCII)
Reimplemented from DataObject.
Definition at line 291 of file ObjectList.h.
|
inline |
|
inline |
|
inlinevirtual |
Return distance of a given object from the beginning of its container It corresponds to the "index" ( from 0 to size()-1 ) If "obj" not fount, return -1.
Implements ObjectContainerBase.
Definition at line 265 of file ObjectList.h.
|
inline |
|
inline |
|
inlinevirtual |
The same as size(), return number of objects in the container.
Implements ObjectContainerBase.
Definition at line 130 of file ObjectList.h.
|
inline |
pop_back = remove the last element from the container The removed object will be deleted (see the method release)
Definition at line 190 of file ObjectList.h.
|
inline |
push_back = append = insert a new element at the end of the container
Definition at line 165 of file ObjectList.h.
|
inline |
Return a reverse_iterator pointing to the beginning of the reversed container.
Definition at line 105 of file ObjectList.h.
|
inline |
Return a const_reverse_iterator pointing to the beginning of the reversed container.
Definition at line 110 of file ObjectList.h.
|
inlinevirtual |
Release object from the container (the pointer will be removed from the container, but the object itself will remain alive) (see the method pop_back)
Implements ObjectContainerBase.
Definition at line 202 of file ObjectList.h.
|
inline |
Return a reverse_iterator pointing to the end of the reversed container.
Definition at line 115 of file ObjectList.h.
|
inline |
Return a const_reverse_iterator pointing to the end of the reversed container.
Definition at line 120 of file ObjectList.h.
|
inline |
Return the size of the container Size means the number of objects stored in the container, independently on the amount of information stored in each object.
Definition at line 126 of file ObjectList.h.
|
private |
The STL list.
Definition at line 314 of file ObjectList.h.