|
ATLAS Offline Software
|
Go to the documentation of this file.
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>
327 void assign(std::initializer_list<value_type>
l);
336 template <
class CONTAINER>
925 #ifndef XAOD_STANDALONE
981 template <
class DV,
class U>
985 static void init() { DV::dvlinfo(); }
1003 #endif // not XAOD_STANDALONE
1009 #endif // not ATHCONTAINERS_CONSTDATAVECTOR_H
const SG::AuxVectorBase & auxbase() const
Convert to AuxVectorBase.
char data[hepevt_bytes_allocation_ATLAS]
ConstDataVector(size_type n, SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Sized constructor.
void assign(InputIterator first, InputIterator last)
Assign from iterators.
DV::difference_type difference_type
ElementProxy at(size_type n)
Access an element, as an lvalue.
DV::const_reverse_iterator const_reverse_iterator
static const bool has_virtual
This needs to be forwarded from the base as well.
DataModel_detail::iterator< ConstDataVector > iterator
The iterator for this type.
static DV::iterator to_base_iterator(iterator it)
Convert a ConstDataVector::iterator to an iterator of the base DataVector.
DV::const_value_type * pointer
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
iterator end() noexcept
Return an iterator pointing past the end of the collection.
iterator to_my_iterator(typename DV::iterator it)
Convert an iterator of the base DataVector to a ConstDataVector::iterator.
DV::const_value_type & reference
static constexpr bool must_own
If true, then this type must own its contents.
void swapElement(size_type index, value_type newElem, reference oldElem)
Swap one element out of the container.
bool const RAWDATA *ch2 const
DataBucket class for ConstDataVector.
void assign(const std::vector< ElementLink< CONTAINER > > &v)
Assign from a vector of ElementLinks.
DataModel_detail::ElementProxy< ConstDataVector > ElementProxy
This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership.
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
ElementProxy front()
Access the first element in the collection as an lvalue.
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
DVLConstDataVectorBucket(std::unique_ptr< ConstDataVector< DV > > data)
Constructor from a payload object.
DV::BaseContainer BaseContainer
void clear()
Erase all the elements in the collection.
DataVector< base_value_type > base_data_vector
(Non-const) Iterator class for DataVector/DataList.
@ OWN_ELEMENTS
this data object owns its elements
a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataO...
void swap(ConstDataVector &rhs)
Swap this collection with another.
ElementProxy back()
Access the last element in the collection as an lvalue.
void assign(std::initializer_list< value_type > l)
Assign from an initializer list.
iterator emplace(iterator position, value_type pElem)
Add a new element to the collection.
Default, invalid implementation of ClassID_traits.
ElementProxy to_element_proxy(typename BaseContainer::iterator i)
Convert an iterator of the base vector to an ElementProxy for the ConstDataVector.
Provide an interface for finding inheritance information at run time.
friend void test2_assignelement1a()
ConstDataVector(const std::vector< ElementLink< CONTAINER > > &v)
Constructor from a vector of ElementLinks.
DV::size_type size_type
Basic types, forwarded from the base.
DV::const_value_type const_value_type
ElementProxy operator[](size_type n)
Access an element, as an lvalue.
DV::const_value_type const & const_reference
SG::DVLConstDataVectorBucket< DV > type
DV::const_iterator const_iterator
std::unique_ptr< const base_value_type > unique_type
Type of a unique_ptr that can be used to insert elements into this container.
ConstDataVector(InputIterator first, InputIterator last, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS)
Constructor from iterators.
ConstDataVector(std::initializer_list< value_type > l, SG::OwnershipPolicy ownPolicy=SG::VIEW_ELEMENTS)
Constructor from an initializer list.
static void iter_swap(iterator a, iterator b)
Swap the referents of two DataVector iterators.
ConstDataVector(const ConstDataVector &)=default
Copy constructor.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ConstDataVector(SG::OwnershipPolicy ownPolicy, ARGS &&... args)
Constructor with argument forwarding.
reverse_iterator rend() noexcept
Return a reverse_iterator pointing at the beginning of the collection.
void assignElement(typename BaseContainer::iterator pos, value_type newElem)
Handle element assignment.
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
DV::allocator_type allocator_type
ConstDataVector(ConstDataVector &&rhs)
Move constructor.
An STL vector of pointers that by default owns its pointed-to elements.
void assignBaseElement(typename BaseContainer::iterator pos, typename BaseContainer::value_type newElem)
Handle element assignment from a base pointer.
A DataBucket specialized for DataVector/DataList.
value_type emplace_back(value_type pElem)
Add an element to the end of the collection.
static const ConstDataVector * fromDataVector(const DV *dv)
Cast from a DataVector to a ConstDataVector.
DataVector adapter that acts like it holds const pointers.
ConstDataVector & operator=(const ConstDataVector &rhs)
Assignment operator.
DV::base_value_type base_value_type
friend void test2_assignelement1()
iterator erase(iterator position)
Remove element at a given position.
reverse_iterator rbegin() noexcept
Return a reverse_iterator pointing past the end of the collection.
DVLConstDataVectorBucket(ConstDataVector< DV > *data)
Constructor from a payload object.
BOOST_STATIC_CONSTANT(bool, s_isConst=true)
DV::const_value_type const * const_pointer
Proxy for lvalue access to DataVector/DataList elements.
void resortAux(iterator, iterator)
Reset indices / reorder aux data after elements have been permuted.
Metafunction to find the proper DataBucket class for T.
std::reverse_iterator< iterator > reverse_iterator
Standard reverse_iterator.
iterator begin() noexcept
Return an iterator pointing at the beginning of the collection.
DataVector< SG::AuxElement > BaseContainer
ConstDataVector(SG::OwnershipPolicy ownPolicy=SG::OWN_ELEMENTS)
Default constructor.
DV::const_value_type value_type
These types get modified so that the base's const_value_type becomes our value_type.
boost::true_type isSequence