ElementLinkVector implementation for standalone ROOT. More...
#include <ElementLinkVector.h>
Public Types | |
typedef ElementLinkVector < CONTAINER > | ElemLinkVec |
Definition of the current type. | |
typedef ElementLink< CONTAINER > | ElemLink |
Type of the EL that we have a vector of. | |
typedef ElementLinkVector < CONTAINER > | self |
Helper definition. | |
STL-like type definitions | |
typedef ElemLink | value_type |
Standard typedef for the type of the held objects. | |
typedef ElemLink & | reference |
Type of the reference pointing to one element link. | |
typedef const ElemLink & | const_reference |
Type of the constant reference pointing to one element link. | |
typedef std::vector< ElemLink > ::iterator | iterator |
Type of the iterator for traversing the vector. | |
typedef std::vector< ElemLink > ::const_iterator | const_iterator |
Type of the constant iterator for traversing the vector. | |
typedef std::vector< ElemLink > ::reverse_iterator | reverse_iterator |
Type of the reverse iterator for traversing the vector. | |
typedef std::vector< ElemLink > ::const_reverse_iterator | const_reverse_iterator |
Type of the constant reverse iterator for traversing the vector. | |
typedef std::vector< ElemLink > ::size_type | size_type |
Type of the size of the vector. | |
Public Member Functions | |
ElemLinkVec & | operator= (const ElemLinkVec &rhs) |
Assignment operator. | |
virtual bool | toTransient () |
Reset the object's internal cache. | |
bool | toPersistent () |
Function copying the transient data into the persistent variables. | |
Constructors | |
ElementLinkVector () | |
Default constructor. | |
ElementLinkVector (size_type n, const ElemLink &link=ElemLink()) | |
Constructor creating a vector of a given size. | |
ElementLinkVector (const ElemLinkVec &parent) | |
Copy constructor. | |
Vector iterator functions | |
iterator | begin () |
Get an iterator pointing at the first element. | |
const_iterator | begin () const |
Get a constant iterator pointing at the first element. | |
iterator | end () |
Get an iterator pointing at the end of the container. | |
const_iterator | end () const |
Get a constant iterator pointing at the end of the container. | |
reverse_iterator | rbegin () |
Get a reverse iterator pointing at the last element. | |
const_reverse_iterator | rbegin () const |
Get a constant reverse iterator pointing at the last element. | |
reverse_iterator | rend () |
Get a reverse iterator pointing at the beginning of the container. | |
const_reverse_iterator | rend () const |
Get a constant reverse iterator pointing at the beginning of the container. | |
Vector capacity functions | |
size_type | size () const |
Get the size of the vector. | |
size_type | max_size () const |
Get the maximal size of the object. | |
size_type | capacity () const |
Get the capacity of the currently allocated object. | |
void | resize (size_type sz, const ElemLink &link=ElemLink()) |
Resize the vector to the specified size. | |
void | reserve (size_type sz) |
Reserve some slots in the vector. | |
bool | empty () const |
Function checking if the vector is empty. | |
Vector element accessors | |
const_reference | operator[] (size_type n) const |
Get the element at a given index. | |
const_reference | at (size_type n) const |
Get the element at a given index (with size check). | |
const_reference | front () const |
Get the first element. | |
const_reference | back () const |
Get the last element. | |
Vector modifiers | |
void | push_back (const ElemLink &el) |
Add a new element link at the end of the vector. | |
void | pop_back () |
Remove the last element from the vector. | |
iterator | erase (iterator position) |
Erase one element from the vector. | |
iterator | erase (iterator first, iterator last) |
Erase a set of elements from the vector. | |
void | swap (ElemLinkVec &vec) |
Swap the container's contents with another object's. | |
template<class InputIterator > | |
void | assign (InputIterator first, InputIterator last) |
Fill the vector with the contents of another container. | |
void | assign (size_type n, const ElemLink &link) |
Fill the vector with N identical links. | |
iterator | insert (iterator position, const ElemLink &link) |
Insert a link in a certain position. | |
void | insert (iterator position, size_type n, const ElemLink &link) |
Insert a number of identical links in a certain position. | |
void | clear () |
Clear the object. | |
Public Attributes | |
ROOT_SELECTION_NS::MemberAttributes < kTransient > | m_elVec |
Mark all transient members:. |
ElementLinkVector implementation for standalone ROOT.
This class provides part of the interface provided by the offline implementation of ElementLinkVector. Just enough to make the code meaningfully usable in ROOT. But the plan is not to provide the full flexibility of the offline class.
bool ElementLinkVector< CONTAINER >::toPersistent | ( | ) | [inline] |
Function copying the transient data into the persistent variables.
In a few cases the simplest way of syncronising the transient and persistent data of the object is to simply re-create the persistent data from scratch. This function does this.
true
in case of success, and false
in case of failure