#include <AuxPersVector.h>
Public Types | |
typedef VEC & | vector_type |
Convenience type definition. | |
Public Member Functions | |
AuxPersVector (vector_type vec) | |
Constructor. | |
virtual SG::IAuxTypeVector * | clone () const |
Make a copy of this vector. | |
virtual void * | toPtr () |
Return a pointer to the start of the vector's data. | |
virtual void * | toVector () |
Return a pointer to the STL vector itself. | |
virtual size_t | size () const |
Return the size of the vector. | |
virtual void | resize (size_t sz) |
Change the size of the vector. | |
virtual void | reserve (size_t sz) |
Change the capacity of the vector. | |
virtual void | shift (size_t pos, ptrdiff_t offs) |
Shift the elements of the vector. | |
virtual bool | setOption (const SG::AuxDataOption &option) |
Set an option for this variable. | |
virtual const std::type_info * | objType () const |
Return the type of the complete object to be saved. |
Class managing concrete vector variables
This class is used internally by the "special" auxiliary store objects to manage the auxiliary variables handled by them. User code probably doesn't want to touch it directly...
virtual const std::type_info* xAOD::AuxPersVector< T, VEC >::objType | ( | ) | const [inline, virtual] |
Return the type of the complete object to be saved.
For example, if the object is a std::vector
, then we return the type_info
of the vector. But if we're holding a PackedContainer
, then we return the type_info
of the PackedContainer
.
Can return null if the operation is not supported. In that case, I/O will use the type found from the variable registry.
Reimplemented from SG::IAuxTypeVector.
virtual void xAOD::AuxPersVector< T, VEC >::reserve | ( | size_t | sz | ) | [inline, virtual] |
Change the capacity of the vector.
sz | The new vector capacity. |
Implements SG::IAuxTypeVector.
virtual void xAOD::AuxPersVector< T, VEC >::resize | ( | size_t | sz | ) | [inline, virtual] |
virtual bool xAOD::AuxPersVector< T, VEC >::setOption | ( | const SG::AuxDataOption & | ) | [inline, virtual] |
Set an option for this variable.
option | The option to set. |
The interpretation of the option depends on the particular representation of the variable provided by the concrete class.
Returns true if the option setting was successful; false otherwise.
Reimplemented from SG::IAuxTypeVector.
virtual void xAOD::AuxPersVector< T, VEC >::shift | ( | size_t | pos, | |
ptrdiff_t | offs | |||
) | [inline, virtual] |
Shift the elements of the vector.
pos | The starting index for the shift. | |
offs | The (signed) amount of the shift. |
This operation shifts the elements in the vectors for all aux data items, to implement an insertion or deletion. offs
may be either positive or negative.
If offs
is positive, then the container is growing. The container size should be increased by offs
, the element at pos
moved to pos
+ offs
, and similarly for following elements. The elements between pos
and pos
+ offs
should be default-initialized.
If offs
is negative, then the container is shrinking. The element at pos
should be moved to pos
+ offs
, and similarly for following elements. The container should then be shrunk by -offs
elements (running destructors as appropriate).
Implements SG::IAuxTypeVector.