14#ifndef ATHCONTAINERS_JAGGEDVECACCESSOR_H
15#define ATHCONTAINERS_JAGGEDVECACCESSOR_H
76template <
class PAYLOAD_T,
class ALLOC>
87 using PayloadAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<Payload_t>;
90 using Elt_t =
typename Base::Elt_t;
115 using Base::operator();
117 using Base::getEltArray;
118 using Base::getPayloadArray;
119 using Base::getEltSpan;
120 using Base::getPayloadSpan;
139 Accessor (
const std::string& name,
const std::string& clsname);
158 template <IsAuxElement ELT>
180 template <CxxUtils::InputRangeOverT<PAYLOAD_T> RANGE>
190 template <CxxUtils::InputRangeOverT<PAYLOAD_T> RANGE>
Handle mappings between names and auxid_t.
Basic definitions for auxiliary types.
Manage lookup of vectors of auxiliary data.
Helper class to provide type-safe access to aux data.
Flag that a class may have auxiliary data associated with it.
Helper class to provide constant type-safe access to aux data, specialized for JaggedVecElt.
Define macros for attributes used to control the static checker.
void set(AuxElement &e, const RANGE &x) const
Set the variable for one element.
detail::JaggedVecProxyT< Payload_t, detail::JaggedVecProxyRefBase > JVecProxyInSpan
ConstAccessor< JaggedVecElt< PAYLOAD_T >, ALLOC > Base
detail::JaggedVecProxyT< Payload_t, detail::JaggedVecProxyValBase > JVecProxy
Writable proxies for a jagged vector element: both a single proxy and one used as part of a span.
bool isAvailableWritable(AuxVectorData &c) const
Test to see if this variable exists in the store and is writable.
void container_pointer_type
Not supported.
void set(AuxVectorData &container, size_t index, const RANGE &x) const
Set the variable for one element.
Elt_span getEltSpan(AuxVectorData &container) const
Get a span over the array of JaggedVecElt objects.
CxxUtils::transform_view_with_at< Elt_span, Converter_t > span
Span over the entire jagged vector.
typename std::allocator_traits< ALLOC >::template rebind_alloc< Payload_t > PayloadAlloc_t
Allocator to use for the payload vector.
JVecProxy reference_type
The writable type we return.
void const_container_pointer_type
Accessor(const SG::auxid_t auxid)
Constructor taking an auxid directly.
typename AuxDataTraits< Payload_t, PayloadAlloc_t >::span Payload_span
span getDataSpan(AuxVectorData &container) const
Get a span over spans representing the jagged vector.
typename AuxDataTraits< Elt_t, ALLOC >::span Elt_span
Spans over the objects that are actually stored.
typename Base::Elt_t Elt_t
One element of the jagged vector.
bool isAvailableWritable(AuxElement &e) const
Test to see if this variable exists in the store and is writable.
detail::JaggedVecConverter< Payload_t > Converter_t
Converter from JaggedVecElt to a (writable) span.
typename Base::Payload_t Payload_t
Payload type.
Accessor(const std::string &name)
Constructor.
Elt_t * getEltArray(AuxVectorData &container) const
Get a pointer to the start of the array of JaggedVecElt objects.
Accessor(const std::string &name, const std::string &clsname)
Constructor.
Payload_t * getPayloadArray(AuxVectorData &container) const
Get a pointer to the start of the payload array.
Payload_span getPayloadSpan(AuxVectorData &container) const
Get a span over the payload vector.
reference_type operator()(ELT &e) const
Fetch the variable for one element, as a non-const reference.
CxxUtils::span< container_value_type > span
Base class for elements of a container that can have aux data.
Manage lookup of vectors of auxiliary data.
const_span getDataSpan(const AuxVectorData &container) const
ConstAccessor(const std::string &name)
SG::auxid_t auxid() const
Describe one element of a jagged vector.
Helper: Make a span — either read-only or writable — from a jagged vector element.
Proxy for jagged vectors.
range_with_at< std::ranges::transform_view< SPAN, XFORM > > transform_view_with_at
Helper to add at() methods to a transform_view.
size_t auxid_t
Identifier for a particular aux data item.
Add at() methods to a range class.