17#ifndef ATHCONTAINERS_ACCESSOR_H
18#define ATHCONTAINERS_ACCESSOR_H
65template <
class T,
class ALLOC = AuxAllocator_t<T> >
109 Accessor (
const std::string& name,
const std::string& clsname);
125 template <IsAuxElement ELT>
146 template <IsAuxElement ELT>
169 template <IsAuxElement ELT>
Handle mappings between names and auxid_t.
Basic definitions for auxiliary types.
Manage lookup of vectors of auxiliary data.
Helper class to provide constant type-safe access to aux data.
Flag that a class may have auxiliary data associated with it.
typename ConstAccessor< T, ALLOC >::const_reference_type rhs_const_reference_type
A const reference type that can appear on the RHS of an assignment to an application of an Accessor o...
typename AuxDataTraits< T, ALLOC >::span span
A span over elements in the container.
typename AuxDataTraits< T, ALLOC >::container_pointer_type container_pointer_type
Pointer into the container holding this item.
span getDataSpan(AuxVectorData &container) const
Get a span over the auxiliary data array.
Accessor(const SG::auxid_t auxid)
Constructor taking an auxid directly.
typename AuxDataTraits< T, ALLOC >::reference_type reference_type
Type referencing an item.
reference_type operator()(ELT &e) const
Fetch the variable for one element, as a non-const reference.
typename AuxDataTraits< T, ALLOC >::element_type element_type
Type the user sees.
container_pointer_type getDataArray(AuxVectorData &container) const
Get a pointer to the start of the auxiliary data array.
void set(ELT &e, const element_type &x) const
Set the variable for one element.
bool isAvailableWritable(ELT &e) const
Test to see if this variable exists in the store and is writable.
Accessor(const std::string &name, const std::string &clsname)
Constructor.
Accessor(const std::string &name)
Constructor.
bool isAvailableWritable(AuxVectorData &c) const
Test to see if this variable exists in the store and is writable.
typename vector_type::pointer container_pointer_type
Pointers to the data within the container.
CxxUtils::span< container_value_type > span
element_type & reference_type
Reference types returned by aux data accessors.
T element_type
The type the user sees.
Manage lookup of vectors of auxiliary data.
ConstAccessor(const std::string &name)
Constructor.
typename AuxDataTraits< T, ALLOC >::const_reference_type const_reference_type
SG::auxid_t auxid() const
const SG::AuxVectorData * container() const
Return the container holding this element.
size_t auxid_t
Identifier for a particular aux data item.