![]() |
The Gaudi Framework
v31r0 (aeb156f0)
|
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 ()=default | |
Constructors. More... | |
ObjectList (const ObjectList< TYPE > &)=delete | |
ObjectList & | operator= (const ObjectList< TYPE > &)=delete |
~ObjectList () override | |
Destructor. More... | |
const CLID & | clID () const override |
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... | |
ObjectList< TYPE >::size_type | numberOfObjects () const override |
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... | |
long | add (ContainedObject *pObject) override |
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... | |
long | remove (ContainedObject *value) override |
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... | |
long | index (const ContainedObject *obj) const override |
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... | |
ContainedObject * | containedObject (long dist) const override |
Return const pointer to an object of a given distance. More... | |
std::ostream & | fillStream (std::ostream &s) const override |
Fill the output stream (ASCII) More... | |
![]() | |
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... | |
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 ()=default | |
Constructor. More... | |
ObjectContainerBase (ObjectContainerBase &&)=default | |
ObjectContainerBase & | operator= (ObjectContainerBase &&)=default |
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 14 of file ContainedObject.h.
typedef std::list<TYPE*>::const_iterator ObjectList< TYPE >::const_iterator |
Definition at line 45 of file ObjectList.h.
typedef std::vector<TYPE*>::const_pointer ObjectList< TYPE >::const_pointer |
Definition at line 55 of file ObjectList.h.
typedef std::list<TYPE*>::const_reference ObjectList< TYPE >::const_reference |
Definition at line 42 of file ObjectList.h.
typedef std::list<TYPE*>::const_reverse_iterator ObjectList< TYPE >::const_reverse_iterator |
Definition at line 48 of file ObjectList.h.
typedef TYPE ObjectList< TYPE >::contained_type |
Definition at line 38 of file ObjectList.h.
typedef std::list<TYPE*>::iterator ObjectList< TYPE >::iterator |
Definition at line 44 of file ObjectList.h.
typedef std::vector<TYPE*>::pointer ObjectList< TYPE >::pointer |
Definition at line 54 of file ObjectList.h.
typedef std::list<TYPE*>::reference ObjectList< TYPE >::reference |
Definition at line 41 of file ObjectList.h.
typedef std::list<TYPE*>::reverse_iterator ObjectList< TYPE >::reverse_iterator |
Definition at line 47 of file ObjectList.h.
typedef std::list<TYPE*>::value_type ObjectList< TYPE >::value_type |
Definition at line 39 of file ObjectList.h.
|
default |
Constructors.
|
delete |
|
inlineoverride |
Destructor.
Definition at line 66 of file ObjectList.h.
|
inlineoverridevirtual |
Add an object to the container.
Implements ObjectContainerBase.
Definition at line 136 of file ObjectList.h.
|
inline |
|
inline |
Return const_reference to the last element.
Definition at line 126 of file ObjectList.h.
|
inline |
Return an iterator pointing to the beginning of the container.
Definition at line 76 of file ObjectList.h.
|
inline |
Return a const_iterator pointing to the beginning of the container.
Definition at line 79 of file ObjectList.h.
|
inlinestatic |
Definition at line 70 of file ObjectList.h.
|
inline |
Clear the entire content of the container and delete all contained objects.
Definition at line 210 of file ObjectList.h.
|
inlineoverridevirtual |
Retrieve pointer to class definition structure.
Reimplemented from DataObject.
Definition at line 69 of file ObjectList.h.
|
inlineoverridevirtual |
Return const pointer to an object of a given distance.
Implements ObjectContainerBase.
Definition at line 220 of file ObjectList.h.
|
inline |
Return true if the size of the container is 0.
Definition at line 114 of file ObjectList.h.
|
inline |
Return an iterator pointing to the end of the container.
Definition at line 82 of file ObjectList.h.
|
inline |
Return a const_iterator pointing to the end of the container.
Definition at line 85 of file ObjectList.h.
|
inline |
Erase the object at "position" from the container. The removed object will be deleted.
Definition at line 186 of file ObjectList.h.
|
inline |
Erase the range [first, last) from the container. The removed object will be deleted.
Definition at line 198 of file ObjectList.h.
|
inlineoverridevirtual |
Fill the output stream (ASCII)
Reimplemented from DataObject.
Definition at line 225 of file ObjectList.h.
|
inline |
Return reference to the first element.
Definition at line 117 of file ObjectList.h.
|
inline |
Return const_reference to the first element.
Definition at line 120 of file ObjectList.h.
|
inlineoverridevirtual |
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 214 of file ObjectList.h.
|
inline |
|
inline |
Return the largest possible size of the container.
Definition at line 111 of file ObjectList.h.
|
inlineoverridevirtual |
The same as size(), return number of objects in the container.
Implements ObjectContainerBase.
Definition at line 108 of file ObjectList.h.
|
delete |
|
inline |
pop_back = remove the last element from the container The removed object will be deleted (see the method release)
Definition at line 149 of file ObjectList.h.
|
inline |
push_back = append = insert a new element at the end of the container
Definition at line 129 of file ObjectList.h.
|
inline |
Return a reverse_iterator pointing to the beginning of the reversed container.
Definition at line 89 of file ObjectList.h.
|
inline |
Return a const_reverse_iterator pointing to the beginning of the reversed container.
Definition at line 92 of file ObjectList.h.
|
inlineoverridevirtual |
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 161 of file ObjectList.h.
|
inline |
Return a reverse_iterator pointing to the end of the reversed container.
Definition at line 95 of file ObjectList.h.
|
inline |
Return a const_reverse_iterator pointing to the end of the reversed container.
Definition at line 98 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 103 of file ObjectList.h.
|
private |
The STL list.
Definition at line 241 of file ObjectList.h.