14#ifndef ATHCONTAINERS_JAGGEDVECDECORATOR_H
15#define ATHCONTAINERS_JAGGEDVECDECORATOR_H
75template <
class PAYLOAD_T,
class ALLOC>
84 using PayloadAlloc_t =
typename std::allocator_traits<ALLOC>::template rebind_alloc<Payload_t>;
137 Decorator (
const std::string& name,
const std::string& clsname);
160 template <IsConstAuxElement ELT>
189 void set (
const ELT& e,
const RANGE&
x)
const;
198 template <CxxUtils::InputRangeOverT<PAYLOAD_T> RANGE>
307 template <IsConstAuxElement ELT>
328 const std::string& clsname,
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.
Conversions for accessing jagged vector variables.
Definition of JaggedVecElt.
Factory object that creates vectors using AuxTypeVector, specialized for JaggedVec.
Define macros for attributes used to control the static checker.
Allow customizing how aux data types are treated.
CxxUtils::span< container_value_type > span
CxxUtils::span< const container_value_type > const_span
Manage lookup of vectors of auxiliary data.
span getDecorationSpan(const AuxVectorData &container) const
Get a span over spans representing the jagged vector, as a decoration.
detail::JaggedVecProxyT< Payload_t, detail::JaggedVecProxyRefBase > JVecProxyInSpan
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.
typename AuxDataTraits< Payload_t, PayloadAlloc_t >::const_span const_Payload_span
Decorator(const SG::auxid_t auxid)
Constructor taking an auxid directly.
void const_container_pointer_type
void container_pointer_type
Not supported.
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.
typename ConstConverter_t::element_type element_type
Const span resulting from the conversion.
JVecProxy reference_type
The writable type we return.
CxxUtils::transform_view_with_at< const_Elt_span, ConstConverter_t > const_span
Spans over the entire jagged vector, both writable and not.
Decorator(const std::string &name, const std::string &clsname)
Constructor.
bool isAvailableWritable(const ELT &e) const
Test to see if this variable exists in the store and is writable.
const Payload_t * getPayloadArray(const AuxVectorData &container) const
Get a pointer to the start of the payload array.
bool isAvailableWritable(const AuxVectorData &c) const
Test to see if this variable exists in the store and is writable.
void set(const AuxVectorData &container, size_t index, const RANGE &x) const
Set the variable for one element.
CxxUtils::transform_view_with_at< Elt_span, Converter_t > span
PAYLOAD_T Payload_t
Payload type.
typename std::allocator_traits< ALLOC >::template rebind_alloc< Payload_t > PayloadAlloc_t
Allocator to use for the payload vector.
Decorator(const std::string &name, const std::string &clsname, const SG::AuxVarFlags flags)
Constructor.
detail::JaggedVecConverter< Payload_t > Converter_t
Converter from JaggedVecElt to a (writable) span.
Decorator(const std::string &name)
Constructor.
Elt_span getEltDecorSpan(const AuxVectorData &container) const
Get a span over the array of JaggedVecElt objects, as a decoration.
typename AuxDataTraits< JaggedVecElt< Payload_t >, ALLOC >::span Elt_span
typename AuxDataTraits< JaggedVecElt< Payload_t >, ALLOC >::const_span const_Elt_span
Spans over the objects that are actually stored.
const_span getDataSpan(const AuxVectorData &container) const
Get a span over spans representing the jagged vector.
detail::JaggedVecConstConverter< Payload_t > ConstConverter_t
Converter from JaggedVecElt to a span.
Payload_span getPayloadDecorSpan(const AuxVectorData &container) const
Get a span over the payload vector, as a decoration.
Payload_t * getPayloadDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the payload array, as a decoration.
void set(const ELT &e, const RANGE &x) const
Set the variable for one element.
const_Payload_span getPayloadSpan(const AuxVectorData &container) const
Get a span over the payload vector.
typename AuxDataTraits< Payload_t, PayloadAlloc_t >::span Payload_span
SG::JaggedVecElt< PAYLOAD_T > Elt_t
One element of the jagged vector.
Elt_t * getEltDecorArray(const AuxVectorData &container) const
Get a pointer to the start of the array of JaggedVecElt objects, as a decoration.
SG::auxid_t auxid() const
reference_type operator()(const ELT &e) const
Fetch the variable for one element, as a non-const reference.
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
Helper: Make a span — either read-only or writable — from a jagged vector element.
Proxy for jagged vectors.
Base class usable for accessors for variables with linked variables.
Test if T is compatible with ConstAuxElement.
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.