62#ifndef ATHCONTAINERS_CONSTDATAVECTOR_H
63#define ATHCONTAINERS_CONSTDATAVECTOR_H
66#include "AthLinks/ElementLink.h"
67#include <initializer_list>
97 typedef typename DV::const_value_type *
pointer;
117 typedef typename std::reverse_iterator<iterator>
138 using DV::trackIndices;
139 using DV::testInsert;
140 using DV::getConstStore;
142 using DV::setConstStore;
143 using DV::setNonConstStore;
148 using DV::shrink_to_fit;
160 using DV::operator[];
185 template <
typename... ARGS>
214 template <
class InputIterator>
265 template <
class CONTAINER>
315 template <
class InputIterator>
316 void assign(InputIterator first, InputIterator last);
327 void assign(std::initializer_list<value_type> l);
336 template <
class CONTAINER>
529 template <class InputIterator>
792 SG::IndexTrackingPolicy trackIndices);
925#ifndef XAOD_STANDALONE
981template <
class DV,
class U>
985 static void init() { DV::dvlinfo(); }
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
An STL vector of pointers that by default owns its pointed-to elements.
char data[hepevt_bytes_allocation_ATLAS]
DataVector adapter that acts like it holds const pointers.
DV::size_type size_type
Basic types, forwarded from the base.
reverse_iterator rbegin() noexcept
friend void test2_assignelement1a()
DV::const_value_type * pointer
friend void test2_assignelement1()
void resortAux(iterator, iterator)
value_type push_back(value_type pElem)
DV::base_value_type base_value_type
ConstDataVector(ConstDataVector &&rhs)
Move constructor.
ElementProxy front()
Access the first element in the collection as an lvalue.
DataVector< base_value_type > base_data_vector
ConstDataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Default constructor.
iterator begin() noexcept
Return an iterator pointing at the beginning of the collection.
iterator to_my_iterator(typename T::iterator it)
ConstDataVector(SG::OwnershipPolicy ownPolicy, ARGS &&... args)
Constructor with argument forwarding.
ElementProxy at(size_type n)
Access an element, as an lvalue.
DataModel_detail::ElementProxy< ConstDataVector > ElementProxy
This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership.
std::true_type isSequence
ConstDataVector(std::initializer_list< value_type > l, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS)
Constructor from an initializer list.
std::unique_ptr< const base_value_type > unique_type
Type of a unique_ptr that can be used to insert elements into this container.
ElementProxy to_element_proxy(typename BaseContainer::iterator i)
static const bool has_virtual
iterator erase(iterator position)
value_type emplace_back(value_type pElem)
static const ConstDataVector * fromDataVector(const T *dv)
DV::const_value_type value_type
These types get modified so that the base's const_value_type becomes our value_type.
static T::iterator to_base_iterator(iterator it)
void assignElement(typename BaseContainer::iterator pos, value_type newElem)
iterator insert(iterator position, value_type pElem)
void swapElement(size_type index, value_type newElem, reference oldElem)
const SG::AuxVectorBase & auxbase() const
ElementProxy back()
Access the last element in the collection as an lvalue.
reverse_iterator rend() noexcept
const T * asDataVector() const
DV::const_iterator const_iterator
DV::allocator_type allocator_type
void assign(std::initializer_list< value_type > l)
Assign from an initializer list.
DV::BaseContainer BaseContainer
ConstDataVector(size_type n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Sized constructor.
static constexpr bool must_own
ConstDataVector(InputIterator first, InputIterator last, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS)
Constructor from iterators.
DataModel_detail::iterator< ConstDataVector > iterator
The iterator for this type.
ElementProxy operator[](size_type n)
Access an element, as an lvalue.
void assign(InputIterator first, InputIterator last)
Assign from iterators.
ConstDataVector(const ConstDataVector &)=default
Copy constructor.
DV::const_value_type const & const_reference
DV::const_value_type const * const_pointer
DV::const_reverse_iterator const_reverse_iterator
std::reverse_iterator< iterator > reverse_iterator
Standard reverse_iterator.
ConstDataVector & operator=(const ConstDataVector &rhs)
Assignment operator.
ConstDataVector(const std::vector< ElementLink< CONTAINER > > &v)
Constructor from a vector of ElementLinks.
void swap(ConstDataVector &rhs)
void assign(const std::vector< ElementLink< CONTAINER > > &v)
Assign from a vector of ElementLinks.
static void iter_swap(iterator a, iterator b)
DV::difference_type difference_type
void assignBaseElement(typename BaseContainer::iterator pos, typename BaseContainer::value_type newElem)
DV::const_value_type const_value_type
DV::const_value_type & reference
iterator emplace(iterator position, value_type pElem)
Proxy for lvalue access to DataVector/DataList elements.
(Non-const) Iterator class for DataVector/DataList.
ElementLink implementation for ROOT usage.
Provide an interface for finding inheritance information at run time.
DataBucket class for ConstDataVector.
DVLConstDataVectorBucket(ConstDataVector< DV > *data)
Constructor from a payload object.
DVLConstDataVectorBucket(std::unique_ptr< ConstDataVector< DV > > data)
Constructor from a payload object.
@ OWN_ELEMENTS
this data object owns its elements
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
static constexpr bool s_isConst
Default, invalid implementation of ClassID_traits.
SG::DVLConstDataVectorBucket< DV > type
Metafunction to find the proper DataBucket class for T.