The Gaudi Framework
v30r3 (a5ef0a68)
|
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 |
Public Types inherited from ObjectContainerBase | |
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... | |
Public Member Functions inherited from DataObject | |
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 Public Member Functions inherited from DataObject | |
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 | |
Protected Member Functions inherited from ObjectContainerBase | |
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 46 of file ObjectList.h.
typedef std::vector<TYPE*>::const_pointer ObjectList< TYPE >::const_pointer |
Definition at line 56 of file ObjectList.h.
typedef std::list<TYPE*>::const_reference ObjectList< TYPE >::const_reference |
Definition at line 43 of file ObjectList.h.
typedef std::list<TYPE*>::const_reverse_iterator ObjectList< TYPE >::const_reverse_iterator |
Definition at line 49 of file ObjectList.h.
typedef TYPE ObjectList< TYPE >::contained_type |
Definition at line 39 of file ObjectList.h.
typedef std::list<TYPE*>::iterator ObjectList< TYPE >::iterator |
Definition at line 45 of file ObjectList.h.
typedef std::vector<TYPE*>::pointer ObjectList< TYPE >::pointer |
Definition at line 55 of file ObjectList.h.
typedef std::list<TYPE*>::reference ObjectList< TYPE >::reference |
Definition at line 42 of file ObjectList.h.
typedef std::list<TYPE*>::reverse_iterator ObjectList< TYPE >::reverse_iterator |
Definition at line 48 of file ObjectList.h.
typedef std::list<TYPE*>::value_type ObjectList< TYPE >::value_type |
Definition at line 40 of file ObjectList.h.
|
default |
Constructors.
|
delete |
|
inlineoverride |
Destructor.
Definition at line 67 of file ObjectList.h.
|
inlineoverridevirtual |
Add an object to the container.
Implements ObjectContainerBase.
Definition at line 142 of file ObjectList.h.
|
inline |
|
inline |
Return const_reference to the last element.
Definition at line 129 of file ObjectList.h.
|
inline |
Return an iterator pointing to the beginning of the container.
Definition at line 78 of file ObjectList.h.
|
inline |
Return a const_iterator pointing to the beginning of the container.
Definition at line 81 of file ObjectList.h.
|
inlinestatic |
Definition at line 71 of file ObjectList.h.
|
inline |
Clear the entire content of the container and delete all contained objects.
Definition at line 223 of file ObjectList.h.
|
inlineoverridevirtual |
Retrieve pointer to class definition structure.
Reimplemented from DataObject.
Definition at line 70 of file ObjectList.h.
|
inlineoverridevirtual |
Return const pointer to an object of a given distance.
Implements ObjectContainerBase.
Definition at line 234 of file ObjectList.h.
|
inline |
Return true if the size of the container is 0.
Definition at line 117 of file ObjectList.h.
|
inline |
Return an iterator pointing to the end of the container.
Definition at line 84 of file ObjectList.h.
|
inline |
Return a const_iterator pointing to the end of the container.
Definition at line 87 of file ObjectList.h.
|
inline |
Erase the object at "position" from the container. The removed object will be deleted.
Definition at line 197 of file ObjectList.h.
|
inline |
Erase the range [first, last) from the container. The removed object will be deleted.
Definition at line 210 of file ObjectList.h.
|
inlineoverridevirtual |
Fill the output stream (ASCII)
Reimplemented from DataObject.
Definition at line 240 of file ObjectList.h.
|
inline |
Return reference to the first element.
Definition at line 120 of file ObjectList.h.
|
inline |
Return const_reference to the first element.
Definition at line 123 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 227 of file ObjectList.h.
|
inline |
|
inline |
Return the largest possible size of the container.
Definition at line 114 of file ObjectList.h.
|
inlineoverridevirtual |
The same as size(), return number of objects in the container.
Implements ObjectContainerBase.
Definition at line 111 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 157 of file ObjectList.h.
|
inline |
push_back = append = insert a new element at the end of the container
Definition at line 132 of file ObjectList.h.
|
inline |
Return a reverse_iterator pointing to the beginning of the reversed container.
Definition at line 91 of file ObjectList.h.
|
inline |
Return a const_reverse_iterator pointing to the beginning of the reversed container.
Definition at line 94 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 170 of file ObjectList.h.
|
inline |
Return a reverse_iterator pointing to the end of the reversed container.
Definition at line 97 of file ObjectList.h.
|
inline |
Return a const_reverse_iterator pointing to the end of the reversed container.
Definition at line 100 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 105 of file ObjectList.h.
|
private |
The STL list.
Definition at line 257 of file ObjectList.h.