Struct Acts::TrackAccessorBase¶
-
template<typename T, bool ReadOnly>
struct TrackAccessorBase Utility class that eases accessing dynamic columns in track containers.
- Template Parameters
T – the type of the value to access
ReadOnly – true if this is a const accessor
Public Functions
-
inline TrackAccessorBase(HashedString _key)
Create the accessor from an already-hashed string key.
- Parameters
_key – the key
-
inline TrackAccessorBase(const std::string &_key)
Create the accessor from a string key.
- Parameters
_key – the key
-
template<typename track_proxy_t, bool RO = ReadOnly, typename = std::enable_if_t<!RO>>
inline T &operator()(track_proxy_t track) const Access the stored key on the track given as an argument.
Mutable version
- Template Parameters
track_proxy_t – the type of the track proxy
- Parameters
track – the track to access
- Returns
mutable reference to the column behind the key
-
template<typename track_proxy_t, bool RO = ReadOnly, typename = std::enable_if_t<RO>>
inline const T &operator()(track_proxy_t track) const Access the stored key on the track given as an argument.
COnst version
- Template Parameters
track_proxy_t – the type of the track proxy
- Parameters
track – the track to access
- Returns
const reference to the column behind the key
Public Members
-
HashedString key