ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
SG::PackedLinkVectorT< HOLDER > Class Template Reference

Implementation of IAuxTypeVector holding a vector of PackedLink. More...

#include <PackedLinkVector.h>

Inheritance diagram for SG::PackedLinkVectorT< HOLDER >:
Collaboration diagram for SG::PackedLinkVectorT< HOLDER >:

Public Types

using Base = HOLDER
 
using vector_type = typename Base::vector_type
 
using element_type = typename Base::element_type
 
using vector_value_type = typename Base::vector_value_type
 

Public Member Functions

 PackedLinkVectorT (auxid_t auxid, size_t size, size_t capacity, std::unique_ptr< IAuxTypeVector > linkedVec)
 Constructor. More...
 
 PackedLinkVectorT (const PackedLinkVectorT &other)
 Copy constructor. More...
 
 PackedLinkVectorT (PackedLinkVectorT &&other)
 Move constructor. More...
 
PackedLinkVectorToperator= (const PackedLinkVectorT &other)=delete
 No assignment. More...
 
PackedLinkVectorToperator= (PackedLinkVectorT &&other)=delete
 
virtual std::unique_ptr< IAuxTypeVectorclone () const override
 Make a copy of this vector. More...
 
virtual std::unique_ptr< IAuxTypeVectorlinkedVector () override
 Return ownership of the linked vector. More...
 

Private Attributes

vector_type m_vec
 The contained vector. More...
 
std::unique_ptr< IAuxTypeVectorm_linkedVecHolder
 Holding ownership of the linked vector. More...
 

Detailed Description

template<class HOLDER>
class SG::PackedLinkVectorT< HOLDER >

Implementation of IAuxTypeVector holding a vector of PackedLink.

This is a derived class of PackedLinkVectorHolder that holds the vector instance as a member variable (and thus manages memory internally). It is templated on the base class, so that we can also use this for classes which derive from AuxTypeVectorHolder.

When an instance of this is created, it gets ownership of the linked vector via the constructor. When this interface gets added to an auxiliary store, the ownership of the linked vector will be transferred away using the linkedVector() method, allowing it to be added to the store as well.

Definition at line 207 of file PackedLinkVector.h.

Member Typedef Documentation

◆ Base

template<class HOLDER >
using SG::PackedLinkVectorT< HOLDER >::Base = HOLDER

Definition at line 211 of file PackedLinkVector.h.

◆ element_type

template<class HOLDER >
using SG::PackedLinkVectorT< HOLDER >::element_type = typename Base::element_type

Definition at line 213 of file PackedLinkVector.h.

◆ vector_type

template<class HOLDER >
using SG::PackedLinkVectorT< HOLDER >::vector_type = typename Base::vector_type

Definition at line 212 of file PackedLinkVector.h.

◆ vector_value_type

template<class HOLDER >
using SG::PackedLinkVectorT< HOLDER >::vector_value_type = typename Base::vector_value_type

Definition at line 214 of file PackedLinkVector.h.

Constructor & Destructor Documentation

◆ PackedLinkVectorT() [1/3]

template<class HOLDER >
SG::PackedLinkVectorT< HOLDER >::PackedLinkVectorT ( auxid_t  auxid,
size_t  size,
size_t  capacity,
std::unique_ptr< IAuxTypeVector linkedVec 
)

Constructor.

Makes a new vector.

Parameters
auxidThe auxid of the variable this vector represents.
sizeInitial size of the new vector.
capacityInitial capacity of the new vector.
linkedVecOwnership of the linked vector.

◆ PackedLinkVectorT() [2/3]

template<class HOLDER >
SG::PackedLinkVectorT< HOLDER >::PackedLinkVectorT ( const PackedLinkVectorT< HOLDER > &  other)

Copy constructor.

◆ PackedLinkVectorT() [3/3]

template<class HOLDER >
SG::PackedLinkVectorT< HOLDER >::PackedLinkVectorT ( PackedLinkVectorT< HOLDER > &&  other)

Move constructor.

Member Function Documentation

◆ clone()

template<class HOLDER >
virtual std::unique_ptr<IAuxTypeVector> SG::PackedLinkVectorT< HOLDER >::clone ( ) const
overridevirtual

Make a copy of this vector.

◆ linkedVector()

template<class HOLDER >
virtual std::unique_ptr<IAuxTypeVector> SG::PackedLinkVectorT< HOLDER >::linkedVector ( )
overridevirtual

Return ownership of the linked vector.

◆ operator=() [1/2]

template<class HOLDER >
PackedLinkVectorT& SG::PackedLinkVectorT< HOLDER >::operator= ( const PackedLinkVectorT< HOLDER > &  other)
delete

No assignment.

◆ operator=() [2/2]

template<class HOLDER >
PackedLinkVectorT& SG::PackedLinkVectorT< HOLDER >::operator= ( PackedLinkVectorT< HOLDER > &&  other)
delete

Member Data Documentation

◆ m_linkedVecHolder

template<class HOLDER >
std::unique_ptr<IAuxTypeVector> SG::PackedLinkVectorT< HOLDER >::m_linkedVecHolder
private

Holding ownership of the linked vector.

Definition at line 263 of file PackedLinkVector.h.

◆ m_vec

template<class HOLDER >
vector_type SG::PackedLinkVectorT< HOLDER >::m_vec
private

The contained vector.

Definition at line 260 of file PackedLinkVector.h.


The documentation for this class was generated from the following file: