The Gaudi Framework
master (37c0b60a)
|
#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 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... | |
const ContainedObject * | containedObject (long dist) const override |
Return const pointer to an object of a given distance. More... | |
ContainedObject * | containedObject (long dist) 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... | |
Static Public Member Functions | |
static const CLID & | classID () |
Private Attributes | |
std::list< TYPE * > | m_list |
The STL list. 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 24 of file ContainedObject.h.
typedef std::list<TYPE*>::const_iterator ObjectList::const_iterator |
Definition at line 55 of file ObjectList.h.
typedef std::vector<TYPE*>::const_pointer ObjectList::const_pointer |
Definition at line 65 of file ObjectList.h.
typedef std::list<TYPE*>::const_reference ObjectList::const_reference |
Definition at line 52 of file ObjectList.h.
typedef std::list<TYPE*>::const_reverse_iterator ObjectList::const_reverse_iterator |
Definition at line 58 of file ObjectList.h.
typedef TYPE ObjectList::contained_type |
Definition at line 48 of file ObjectList.h.
typedef std::list<TYPE*>::iterator ObjectList::iterator |
Definition at line 54 of file ObjectList.h.
typedef std::vector<TYPE*>::pointer ObjectList::pointer |
Definition at line 64 of file ObjectList.h.
typedef std::list<TYPE*>::reference ObjectList::reference |
Definition at line 51 of file ObjectList.h.
typedef std::list<TYPE*>::reverse_iterator ObjectList::reverse_iterator |
Definition at line 57 of file ObjectList.h.
typedef std::list<TYPE*>::value_type ObjectList::value_type |
Definition at line 49 of file ObjectList.h.
|
default |
Constructors.
|
delete |
|
inlineoverride |
|
inlineoverride |
|
inline |
Return reference to the last element.
Definition at line 133 of file ObjectList.h.
|
inline |
Return const_reference to the last element.
Definition at line 136 of file ObjectList.h.
|
inline |
Return an iterator pointing to the beginning of the container.
Definition at line 86 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 80 of file ObjectList.h.
|
inline |
Clear the entire content of the container and delete all contained objects.
Definition at line 220 of file ObjectList.h.
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
inline |
Return true if the size of the container is 0.
Definition at line 124 of file ObjectList.h.
|
inline |
Return an iterator pointing to the end of the container.
Definition at line 92 of file ObjectList.h.
|
inline |
Return a const_iterator pointing to the end of the container.
Definition at line 95 of file ObjectList.h.
|
inline |
Erase the range [first, last) from the container. The removed object will be deleted.
Definition at line 208 of file ObjectList.h.
|
inline |
Erase the object at "position" from the container. The removed object will be deleted.
Definition at line 196 of file ObjectList.h.
|
inlineoverride |
|
inline |
Return reference to the first element.
Definition at line 127 of file ObjectList.h.
|
inline |
Return const_reference to the first element.
Definition at line 130 of file ObjectList.h.
|
inlineoverride |
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.
Definition at line 224 of file ObjectList.h.
|
inline |
Insert "value" before "position".
Definition at line 189 of file ObjectList.h.
|
inline |
Return the largest possible size of the container.
Definition at line 121 of file ObjectList.h.
|
inlineoverride |
The same as size(), return number of objects in the container.
Definition at line 118 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 159 of file ObjectList.h.
|
inline |
push_back = append = insert a new element at the end of the container
Definition at line 139 of file ObjectList.h.
|
inline |
Return a reverse_iterator pointing to the beginning of the reversed container.
Definition at line 99 of file ObjectList.h.
|
inline |
Return a const_reverse_iterator pointing to the beginning of the reversed container.
Definition at line 102 of file ObjectList.h.
|
inlineoverride |
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)
Definition at line 171 of file ObjectList.h.
|
inline |
Return a reverse_iterator pointing to the end of the reversed container.
Definition at line 105 of file ObjectList.h.
|
inline |
Return a const_reverse_iterator pointing to the end of the reversed container.
Definition at line 108 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 113 of file ObjectList.h.
|
private |
The STL list.
Definition at line 255 of file ObjectList.h.