The Gaudi Framework
v30r3 (a5ef0a68)
|
ObjectVector is one of the basic Gaudi container classes capable of being registered in Data Stores. More...
#include <GaudiKernel/ObjectVector.h>
Public Types | |
typedef TYPE | contained_type |
typedef std::vector< TYPE * >::value_type | value_type |
typedef std::vector< TYPE * >::reference | reference |
typedef std::vector< TYPE * >::const_reference | const_reference |
typedef std::vector< TYPE * >::iterator | iterator |
typedef std::vector< TYPE * >::const_iterator | const_iterator |
typedef std::vector< TYPE * >::reverse_iterator | reverse_iterator |
typedef std::vector< 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 | |
ObjectVector ()=default | |
Constructors. More... | |
ObjectVector (const ObjectVector< TYPE > &)=delete | |
ObjectVector & | operator= (const ObjectVector< TYPE > &)=delete |
ObjectVector (ObjectVector &&rhs) | |
~ObjectVector () override | |
Destructor. More... | |
const CLID & | clID () const override |
Retrieve class ID. More... | |
ObjectVector< TYPE >::iterator | begin () |
Return an iterator pointing to the beginning of the container. More... | |
ObjectVector< TYPE >::const_iterator | begin () const |
Return a const_iterator pointing to the beginning of the container. More... | |
ObjectVector< TYPE >::iterator | end () |
Return an iterator pointing to the end of the container. More... | |
ObjectVector< TYPE >::const_iterator | end () const |
Return a const_iterator pointing to the end of the container. More... | |
ObjectVector< TYPE >::reverse_iterator | rbegin () |
Return a reverse_iterator pointing to the beginning of the reversed container. More... | |
ObjectVector< TYPE >::const_reverse_iterator | rbegin () const |
Return a const_reverse_iterator pointing to the beginning of the reversed container. More... | |
ObjectVector< TYPE >::reverse_iterator | rend () |
Return a reverse_iterator pointing to the end of the reversed container. More... | |
ObjectVector< TYPE >::const_reverse_iterator | rend () const |
Return a const_reverse_iterator pointing to the end of the reversed container. More... | |
ObjectVector< TYPE >::size_type | size () const |
Return the size of the container. More... | |
ObjectVector< TYPE >::size_type | numberOfObjects () const override |
The same as size(), return number of objects in the container. More... | |
ObjectVector< TYPE >::size_type | max_size () const |
Return the largest possible size of the container. More... | |
ObjectVector< TYPE >::size_type | capacity () const |
Return number of elements for which memory has been allocated It is always greater than or equal to size() More... | |
void | reserve (typename ObjectVector< TYPE >::size_type value) |
Reserve place for "value" objects in the container. More... | |
bool | empty () const |
Return true if the size of the container is 0. More... | |
ObjectVector< TYPE >::reference | front () |
Return reference to the first element. More... | |
ObjectVector< TYPE >::const_reference | front () const |
Return const_reference to the first element. More... | |
ObjectVector< TYPE >::reference | back () |
Return reference to the last element. More... | |
ObjectVector< TYPE >::const_reference | back () const |
Return const_reference to the last element. More... | |
void | push_back (typename ObjectVector< 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 poiter will be removed from the container, but the object itself will remain alive) (see the method pop_back) More... | |
ObjectVector< TYPE >::iterator | insert (typename ObjectVector< TYPE >::iterator position, typename ObjectVector< TYPE >::const_reference value) |
Insert "value" before "position". More... | |
void | erase (typename ObjectVector< TYPE >::iterator position) |
Erase the object at "position" from the container. The removed object will be deleted. More... | |
void | erase (typename ObjectVector< TYPE >::iterator first, typename ObjectVector< 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... | |
ObjectVector< TYPE >::reference | operator[] (typename ObjectVector< TYPE >::size_type n) |
Return the reference to the n'th object in the container. More... | |
ObjectVector< TYPE >::const_reference | operator[] (typename ObjectVector< TYPE >::size_type n) const |
Return the const_reference to the n'th object in the container. More... | |
long | index (const ContainedObject *obj) const override |
Return distance of a given object from the beginning of its container It correcponds 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 (index) 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 () |
Retrieve class ID. More... | |
Static Public Member Functions inherited from DataObject | |
static const CLID & | classID () |
Retrieve reference to class definition structure (static access) More... | |
Private Attributes | |
std::vector< TYPE * > | m_vector |
The STL vector itself. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ObjectContainerBase | |
ObjectContainerBase ()=default | |
Constructor. More... | |
ObjectContainerBase (ObjectContainerBase &&)=default | |
ObjectContainerBase & | operator= (ObjectContainerBase &&)=default |
ObjectVector is one of the basic Gaudi container classes capable of being registered in Data Stores.
It is based on Standard Library (STL) std::vector (see STL Programmer's Guide) ObjectVector has all functions of the std::vector interface, and in addition a number of Gaudi specific functions.
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 12 of file ContainedObject.h.
typedef std::vector<TYPE*>::const_iterator ObjectVector< TYPE >::const_iterator |
Definition at line 47 of file ObjectVector.h.
typedef std::vector<TYPE*>::const_pointer ObjectVector< TYPE >::const_pointer |
Definition at line 56 of file ObjectVector.h.
typedef std::vector<TYPE*>::const_reference ObjectVector< TYPE >::const_reference |
Definition at line 44 of file ObjectVector.h.
typedef std::vector<TYPE*>::const_reverse_iterator ObjectVector< TYPE >::const_reverse_iterator |
Definition at line 50 of file ObjectVector.h.
typedef TYPE ObjectVector< TYPE >::contained_type |
Definition at line 40 of file ObjectVector.h.
typedef std::vector<TYPE*>::iterator ObjectVector< TYPE >::iterator |
Definition at line 46 of file ObjectVector.h.
typedef std::vector<TYPE*>::pointer ObjectVector< TYPE >::pointer |
Definition at line 55 of file ObjectVector.h.
typedef std::vector<TYPE*>::reference ObjectVector< TYPE >::reference |
Definition at line 43 of file ObjectVector.h.
typedef std::vector<TYPE*>::reverse_iterator ObjectVector< TYPE >::reverse_iterator |
Definition at line 49 of file ObjectVector.h.
typedef std::vector<TYPE*>::value_type ObjectVector< TYPE >::value_type |
Definition at line 41 of file ObjectVector.h.
|
default |
Constructors.
|
delete |
|
inline |
Definition at line 64 of file ObjectVector.h.
|
inlineoverride |
Destructor.
Definition at line 70 of file ObjectVector.h.
|
inlineoverridevirtual |
Add an object to the container.
Implements ObjectContainerBase.
Definition at line 165 of file ObjectVector.h.
|
inline |
Return reference to the last element.
Definition at line 149 of file ObjectVector.h.
|
inline |
Return const_reference to the last element.
Definition at line 152 of file ObjectVector.h.
|
inline |
Return an iterator pointing to the beginning of the container.
Definition at line 90 of file ObjectVector.h.
|
inline |
Return a const_iterator pointing to the beginning of the container.
Definition at line 93 of file ObjectVector.h.
|
inline |
Return number of elements for which memory has been allocated It is always greater than or equal to size()
Definition at line 128 of file ObjectVector.h.
|
inlinestatic |
|
inline |
Clear the entire content of the container and delete all contained objects.
Definition at line 245 of file ObjectVector.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Return const pointer to an object of a given distance (index)
Implements ObjectContainerBase.
Definition at line 266 of file ObjectVector.h.
|
inline |
Return true if the size of the container is 0.
Definition at line 140 of file ObjectVector.h.
|
inline |
Return an iterator pointing to the end of the container.
Definition at line 96 of file ObjectVector.h.
|
inline |
Return a const_iterator pointing to the end of the container.
Definition at line 99 of file ObjectVector.h.
|
inline |
Erase the object at "position" from the container. The removed object will be deleted.
Definition at line 219 of file ObjectVector.h.
|
inline |
Erase the range [first, last) from the container. The removed object will be deleted.
Definition at line 232 of file ObjectVector.h.
|
inlineoverridevirtual |
Fill the output stream (ASCII)
Reimplemented from DataObject.
Definition at line 269 of file ObjectVector.h.
|
inline |
Return reference to the first element.
Definition at line 143 of file ObjectVector.h.
|
inline |
Return const_reference to the first element.
Definition at line 146 of file ObjectVector.h.
|
inlineoverridevirtual |
Return distance of a given object from the beginning of its container It correcponds to the "index" ( from 0 to size()-1 ) If "obj" not fount, return -1.
Implements ObjectContainerBase.
Definition at line 259 of file ObjectVector.h.
|
inline |
Insert "value" before "position".
Definition at line 211 of file ObjectVector.h.
|
inline |
Return the largest possible size of the container.
Definition at line 124 of file ObjectVector.h.
|
inlineoverridevirtual |
The same as size(), return number of objects in the container.
Implements ObjectContainerBase.
Definition at line 121 of file ObjectVector.h.
|
delete |
|
inline |
Return the reference to the n'th object in the container.
Definition at line 248 of file ObjectVector.h.
|
inline |
Return the const_reference to the n'th object in the container.
Definition at line 251 of file ObjectVector.h.
|
inline |
pop_back = remove the last element from the container The removed object will be deleted (see the method release)
Definition at line 180 of file ObjectVector.h.
|
inline |
push_back = append = insert a new element at the end of the container
Definition at line 155 of file ObjectVector.h.
|
inline |
Return a reverse_iterator pointing to the beginning of the reversed container.
Definition at line 102 of file ObjectVector.h.
|
inline |
Return a const_reverse_iterator pointing to the beginning of the reversed container.
Definition at line 106 of file ObjectVector.h.
|
inlineoverridevirtual |
Release object from the container (the poiter will be removed from the container, but the object itself will remain alive) (see the method pop_back)
Implements ObjectContainerBase.
Definition at line 193 of file ObjectVector.h.
|
inline |
Return a reverse_iterator pointing to the end of the reversed container.
Definition at line 109 of file ObjectVector.h.
|
inline |
Return a const_reverse_iterator pointing to the end of the reversed container.
Definition at line 112 of file ObjectVector.h.
|
inline |
Reserve place for "value" objects in the container.
If "value" is less than or equal to capacity(), this call has no effect, otherwise, it is a request for allocation of additional memory. If the request is successful, then capacity() is >= n, otherwise, capacity() is unchanged. In either case, size() is unchanged
Definition at line 137 of file ObjectVector.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 118 of file ObjectVector.h.
|
private |
The STL vector itself.
Definition at line 286 of file ObjectVector.h.