14#ifndef ATHCONTAINERS_JAGGEDVECCONSTACCESSOR_H
15#define ATHCONTAINERS_JAGGEDVECCONSTACCESSOR_H
66template <
class PAYLOAD_T,
class ALLOC>
75 using PayloadAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<Payload_t>;
135 template <IsConstAuxElement ELT>
200 const std::string& clsname,
Allow customizing how aux data types are treated.
Base class for elements of a container that can have aux data.
Basic definitions for auxiliary types.
Helper class to provide constant type-safe access to aux data.
Conversions for accessing jagged vector variables.
Definition of JaggedVecElt.
Factory object that creates vectors using AuxTypeVector, specialized for JaggedVec.
Base class usable for accessors for variables with linked variables.
CxxUtils::span< const container_value_type > const_span
Manage lookup of vectors of auxiliary data.
ConstAccessor(const std::string &name)
Constructor.
void const_container_pointer_type
Not supported.
CxxUtils::transform_view_with_at< const_Elt_span, ConstConverter_t > const_span
Transform a span over elements to a span of spans.
typename AuxDataTraits< Elt_t, ALLOC >::const_span const_Elt_span
Spans over the objects that are actually stored.
ConstAccessor(const std::string &name, const std::string &clsname)
Constructor.
const_span getDataSpan(const AuxVectorData &container) const
Get a span over spans representing the jagged vector.
const_Payload_span getPayloadSpan(const AuxVectorData &container) const
Get a span over the payload vector.
PAYLOAD_T Payload_t
Payload type.
typename AuxDataTraits< Payload_t >::const_span const_Payload_span
typename ConstConverter_t::element_type element_type
Span resulting from the conversion. This is the type the user sees.
ConstAccessor(const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
Constructor.
SG::JaggedVecElt< Payload_t > Elt_t
One element of the jagged vector.
ConstAccessor(const SG::auxid_t auxid)
Constructor taking an auxid directly.
const Payload_t * getPayloadArray(const AuxVectorData &container) const
Get a pointer to the start of the payload array.
typename std::allocator_traits< ALLOC >::template rebind_alloc< Payload_t > PayloadAlloc_t
Allocator to use for the payload vector.
const_Elt_span getEltSpan(const AuxVectorData &container) const
Get a span over the array of JaggedVecElt objects.
const Elt_t * getEltArray(const AuxVectorData &container) const
Get a pointer to the start of the array of JaggedVecElt objects.
ConstAccessor(const detail::LinkedVarAccessorBase &b)
Constructor.
detail::JaggedVecConstConverter< Payload_t > ConstConverter_t
Converter from JaggedVecElt to a span.
element_type const_reference_type
Type referencing an item.
const_reference_type operator()(const ELT &e) const
Fetch the variable for one element, as a const reference.
SG::auxid_t auxid() const
Describe one element of a jagged vector.
Helper: Make a span from a jagged vector element.
CxxUtils::range_with_conv< typename AuxDataTraits< Payload_t >::const_span > element_type
Base class usable for accessors for variables with linked variables.
range_with_at< std::ranges::transform_view< SPAN, XFORM > > transform_view_with_at
Helper to add at() methods to a transform_view.
AuxVarFlags
Additional flags to qualify an auxiliary variable.
size_t auxid_t
Identifier for a particular aux data item.
Add at() methods to a range class.
Add to a range class conversions to containers.