![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef ATHCONTAINERS_AUXTYPEVECTOR_H
14 #define ATHCONTAINERS_AUXTYPEVECTOR_H
26 #include <type_traits>
48 template <
class T,
class CONT>
123 virtual std::unique_ptr<IAuxTypeVector>
clone()
const override;
135 virtual const void*
toPtr()
const override;
150 virtual const std::type_info*
objType()
const override;
156 virtual size_t size()
const override;
213 virtual bool shift (
size_t pos, ptrdiff_t offs)
override;
250 virtual std::unique_ptr<IAuxTypeVector>
toPacked()
override;
300 template <
class HOLDER>
350 virtual std::unique_ptr<IAuxTypeVector>
clone()
const override;
373 #endif // not ATHCONTAINERS_AUXTYPEVECTOR_H
JetConstituentVector::iterator iterator
void insertMove1(typename CONT::iterator pos, element_type *beg, element_type *end, std::true_type)
Helper for insertMove.
bool isLinked() const
Return true if this variable is linked from another one.
CONT vector_type
Type of the STL vector used for storage.
Container to hold aux data to be stored in a packed form.
std::allocator< T > AuxAllocator_t
The default allocator type to use for auxiliary variables.
AuxDataTraits< T >::element_type element_type
Type that the user sees.
virtual std::unique_ptr< IAuxTypeVector > toPacked() override
Try to convert this aux vector to a PackedContainer.
virtual std::unique_ptr< IAuxTypeVector > clone() const override
Make a copy of this vector.
AuxTypeVectorHolder(const AuxTypeVectorHolder &other)
Copy constructor.
static const int SCALE
1 for the usual case of V being vector<T>.
AuxTypeVectorHolder & operator=(const AuxTypeVectorHolder &other)
Assignment.
virtual size_t size() const override
Return the size of the vector.
std::vector< T, allocator_type > vector_type
Container type used to store this variable.
virtual const void * toPtr() const override
Return a pointer to the start of the vector's data.
virtual bool insertMove(size_t pos, void *beg, void *end, IAuxStore &srcStore) override
Insert elements into the vector via move semantics.
Abstract interface for manipulating vectors of arbitrary types.
~AuxTypeVectorHolder()
Destructor.
size_t auxid_t
Identifier for a particular aux data item.
AuxTypeVectorT(AuxTypeVectorT &&other)
Move constructor.
Implementation of IAuxTypeVector holding a vector instance.
AuxTypeVectorT(auxid_t auxid, size_t size, size_t capacity, bool isLinked)
Constructor.
bool m_ownFlag
True if we need to delete the object.
Allow customizing how aux data types are treated.
vector_type * m_vecPtr
The contained vector.
vector_type::value_type vector_value_type
Vector element type.
typename Base::element_type element_type
Hold information about an option setting request.
virtual bool resize(size_t sz) override
Change the size of the vector.
T element_type
The type the user sees.
void insertMove1(typename CONT::iterator pos, element_type *beg, element_type *end, std::false_type)
Helper for insertMove.
AuxTypeVectorHolder(AuxTypeVectorHolder &&other)
Move constructor.
auxid_t auxid() const
Return the auxid of the variable this vector represents.
virtual bool setOption(const AuxDataOption &option) override
Make an option setting.
Interface for non-const operations on an auxiliary store.
typename Base::vector_value_type vector_value_type
Abstract interface for setting a option on a aux data container.
virtual const std::type_info * objType() const override
Return the type of the payload object for this instance.
virtual void reserve(size_t sz) override
Change the capacity of the vector.
AuxTypeVectorT & operator=(const AuxTypeVectorT &other)
Assignment.
AuxTypeVectorHolder(auxid_t auxid, vector_type *vecPtr, bool ownFlag, bool isLinked)
Constructor.
Abstract interface for manipulating vectors of arbitrary types.
virtual void * toVector() override
Return a pointer to the STL vector itself.
virtual void * toPtr() override
Return a pointer to the start of the vector's data.
AuxTypeVectorT(const AuxTypeVectorT &other)
Copy constructor.
virtual std::unique_ptr< IAuxTypeVector > clone() const override
Make a copy of this vector.
typename Base::vector_type vector_type
Implementation of IAuxTypeVector for specific types.
vector_type & vec()
Return a reference to the payload vector.
virtual bool shift(size_t pos, ptrdiff_t offs) override
Shift the elements of the vector.
vector_type m_vec
The contained vector.