|
ATLAS Offline Software
|
Go to the documentation of this file.
13 #ifndef ATHCONTAINERS_JAGGEDVECCONVERSIONS_H
14 #define ATHCONTAINERS_JAGGEDVECCONVERSIONS_H
47 template <
class PAYLOAD_T>
130 const Elt_t&
elt (
size_t elt_index)
const noexcept;
176 :
public std::ranges::view_base
204 :
public std::ranges::view_base
248 template <
class PAYLOAD_T,
class BASE>
750 #endif // not ATHCONTAINERS_JAGGEDVECCONVERSIONS_H
Elt_t & elt() noexcept
Return a reference to this proxy's element.
void insert_range(nonnull_iterator pos, const RANGE &range)
Insert a range of items into this jagged vector element.
void erase(nonnull_iterator pos)
Erase one item from this jagged vector element.
const_iterator cbegin() const noexcept
Return a (const) begin iterator.
Proxy for jagged vectors.
void adjust1(size_t elt_index, index_type index, int n_add)
Add or remove payload items from one jagged vector element.
iterator end() noexcept
Return a (non-const) end iterator.
JaggedVecProxyBase(const AuxDataSpanBase &elts, AuxVectorData &container, SG::auxid_t auxid)
Constructor.
Helper: Make a span from a jagged vector element.
size_t elt_begin() const noexcept
Return the begin payload index of this proxy's element.
void push_back(const Payload_t &x)
Add an item to the end of this jagged vector element.
Payload_t element_type
Standard type aliases.
Base class for jagged vector proxies.
void resize(size_t n, const Payload_t &x=Payload_t())
Resize this jagged vector element.
JaggedVecProxyT(size_t elt_index, Payload_span payload, const AuxDataSpanBase &elts, AuxVectorData &container, SG::auxid_t auxid)
Constructor.
JaggedVecProxyBase::Elt_span Elt_span
size_t m_index
Index of the element we're proxying.
Payload_span m_payload
The span over the payload vector.
size_t size() const noexcept
Return the size of this jagged vector element.
std::vector< Payload_t > asVector() const
Convert this jagged vector element to a vector.
Describe a range over an auxiliary variable, for low-overhead access.
void insert(nonnull_iterator pos, const Payload_t &x)
Insert an item into this jagged vector element.
void append_range(const RANGE &range)
Append a range of items to the end of this jagged vector element.
JaggedVecProxyBase m_base
The proxy base information.
bool const RAWDATA *ch2 const
reverse_iterator rend() noexcept
Return a (non-const) end reverse iterator.
Add to a range class conversions to containers.
nonnull_iterator(std::nullptr_t)=delete
std::span< Elt_t > Elt_span
A span of elements.
Abstract interface for manipulating vectors of arbitrary types.
const_pointer const_iterator
Describe one element of a jagged vector (base class).
concept InputRangeOverT
Concept for an input range over a given type.
Elt_span m_elts
The elements of the jagged vector.
Helper: Make a span — either read-only or writable — from a jagged vector element.
Adapter for holding the proxy base information by value.
uint32_t index_type
Type for the indices.
const_Payload_span m_payload
The span over the payload vector.
reverse_iterator rbegin() noexcept
Return a (non-const) begin reverse iterator.
size_t auxid_t
Identifier for a particular aux data item.
AuxVectorData & m_container
The container holding the variable.
std::variant< IAuxTypeVector *, SG::auxid_t > m_linkedVec
PAYLOAD_T Payload_t
The type of the jagged vector payload.
JaggedVecProxyBase & m_base
The proxy base information.
iterator begin() noexcept
Return a (non-const) begin iterator.
size_t elt_end() const noexcept
Return the end payload index of this proxy's element.
typename Elt_t::index_type index_type
JaggedVecProxyRefBase(JaggedVecProxyBase &base)
Constructor.
const element_type * const_pointer
reference front() noexcept
Return a reference to the first item in this element's payload.
Elt_t & elt(size_t elt_index) noexcept
Return one jagged vector element (non-const).
Allow customizing how aux data types are treated.
void assign_range(const RANGE &range)
Assign this jagged vector element from a range.
const Elt_t & elt(size_t elt_index) const noexcept
Return one jagged vector element (const).
PAYLOAD_T Payload_t
The payload type.
const element_type operator()(const JaggedVecEltBase &elt) const
Convert to a span.
const element_type & const_reference
Manage lookup of vectors of auxiliary data.
const JaggedVecEltBase * m_elts
The vector of elements.
void resize1(size_t elt_index, index_type n_new)
Resize one jagged vector element.
Minimal span-like object describing the range of an auxiliary variable.
void pop_back()
Remove the last item from this jagged vector element.
reference at(size_t i)
Element access (non-const, bounds-checked).
PAYLOAD_T Payload_t
The type of the jagged vector payload.
typename Elt_t::index_type index_type
Type used for indexing into a jagged vector.
void test_JaggedVecProxyRefBase()
nonnull_iterator(iterator it)
void assign(size_t n, const Payload_t &x)
Set this jagged vector element to a number of items.
Basic definitions for auxiliary types.
bool empty() const noexcept
Test if this jagged vector element is empty.
Definition of JaggedVecElt.
void test_JaggedVecProxyValBase()
Compatibility helpers for using some pieces of C++20 concepts with older compilers.
JaggedVecProxyBase m_base
The proxy base information.
pointer iterator
Use pointers as iterators.
nonnull_iterator(int)=delete
Describe one element of a jagged vector.
void clear()
Clear this jagged vector element.
JaggedVecProxyValBase(const AuxDataSpanBase &elts, AuxVectorData &container, SG::auxid_t auxid)
Constructor.
const_reverse_iterator crend() const noexcept
Return a (const) end reverse iterator.
Add to a range class conversions to containers.
std::reverse_iterator< const_iterator > const_reverse_iterator
std::ptrdiff_t difference_type
Manage lookup of vectors of auxiliary data.
const_iterator cend() const noexcept
Return a (const) end iterator.
Helper for passing iterators.
reference back() noexcept
Return a reference to the last item in this element's payload.
Adapter for holding the proxy base information by reference.
Payload_span m_payload
Reference to a span over the payload vector.
std::reverse_iterator< iterator > reverse_iterator
JaggedVecConverter(AuxVectorData &container, auxid_t auxid, auxid_t linked_auxid)
Constructor.
const_reverse_iterator crbegin() const noexcept
Return a (const) begin reverse iterator.
SG::JaggedVecEltBase Elt_t
Type of a jagged vector element.
JaggedVecProxyT(size_t elt_index, Payload_span payload, JaggedVecProxyBase &base)
Constructor.
JaggedVecConstConverter(const JaggedVecEltBase *elts, const_Payload_span payload)
Constructor.