ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
SG::detail::JaggedVecConverter< PAYLOAD_T > Class Template Reference

Helper: Make a span — either read-only or writable — from a jagged vector element. More...

#include <JaggedVecConversions.h>

Collaboration diagram for SG::detail::JaggedVecConverter< PAYLOAD_T >:

Public Types

using Payload_t = PAYLOAD_T
 The type of the jagged vector payload. More...
 
using Payload_span = detail::AuxDataSpan< Payload_t >
 An AuxDataSpan representing the payload vector. More...
 
using element_type = CxxUtils::range_with_conv< typename AuxDataTraits< Payload_t >::const_span >
 The type of the (read-only) span we produce. More...
 
using JVecProxyInSpan = JaggedVecProxyT< Payload_t, JaggedVecProxyRefBase >
 The type of the (writable) span we produce. More...
 
using value_type = JVecProxyInSpan
 

Public Member Functions

 JaggedVecConverter (AuxVectorData &container, auxid_t auxid, auxid_t linked_auxid)
 Constructor. More...
 
const element_type operator() (const SG::JaggedVecEltBase &elt) const
 Convert to a (read-only) span. More...
 
value_type operator() (SG::JaggedVecEltBase &elt)
 Convert to a (writable) span. More...
 

Private Attributes

JaggedVecProxyBase m_base
 The proxy base information. More...
 
Payload_span m_payload
 The span over the payload vector. More...
 

Detailed Description

template<class PAYLOAD_T>
class SG::detail::JaggedVecConverter< PAYLOAD_T >

Helper: Make a span — either read-only or writable — from a jagged vector element.

An instance of this class is constructed from an AuxDataSpan over the payload vector. (This has a reference to the range held by the AuxTypeVector, so if the payload vector changes, we'll see it here.) operator() then takes a JaggedVecElt and produces a span representing that element.

Definition at line 692 of file JaggedVecConversions.h.

Member Typedef Documentation

◆ element_type

template<class PAYLOAD_T >
using SG::detail::JaggedVecConverter< PAYLOAD_T >::element_type = CxxUtils::range_with_conv<typename AuxDataTraits<Payload_t>::const_span>

The type of the (read-only) span we produce.

Definition at line 702 of file JaggedVecConversions.h.

◆ JVecProxyInSpan

The type of the (writable) span we produce.

Definition at line 706 of file JaggedVecConversions.h.

◆ Payload_span

template<class PAYLOAD_T >
using SG::detail::JaggedVecConverter< PAYLOAD_T >::Payload_span = detail::AuxDataSpan<Payload_t>

An AuxDataSpan representing the payload vector.

Definition at line 699 of file JaggedVecConversions.h.

◆ Payload_t

template<class PAYLOAD_T >
using SG::detail::JaggedVecConverter< PAYLOAD_T >::Payload_t = PAYLOAD_T

The type of the jagged vector payload.

Definition at line 696 of file JaggedVecConversions.h.

◆ value_type

template<class PAYLOAD_T >
using SG::detail::JaggedVecConverter< PAYLOAD_T >::value_type = JVecProxyInSpan

Definition at line 707 of file JaggedVecConversions.h.

Constructor & Destructor Documentation

◆ JaggedVecConverter()

template<class PAYLOAD_T >
SG::detail::JaggedVecConverter< PAYLOAD_T >::JaggedVecConverter ( AuxVectorData container,
auxid_t  auxid,
auxid_t  linked_auxid 
)

Constructor.

Parameters
containerThe container holding this variable.
auxidThe aux ID of this variable.
linked_auxidThe aux ID for the linked payload variable.

Member Function Documentation

◆ operator()() [1/2]

template<class PAYLOAD_T >
const element_type SG::detail::JaggedVecConverter< PAYLOAD_T >::operator() ( const SG::JaggedVecEltBase elt) const

Convert to a (read-only) span.

Parameters
eltThe jagged vector element to transform.

◆ operator()() [2/2]

template<class PAYLOAD_T >
value_type SG::detail::JaggedVecConverter< PAYLOAD_T >::operator() ( SG::JaggedVecEltBase elt)

Convert to a (writable) span.

Parameters
eltThe jagged vector element to transform.

Member Data Documentation

◆ m_base

template<class PAYLOAD_T >
JaggedVecProxyBase SG::detail::JaggedVecConverter< PAYLOAD_T >::m_base
private

The proxy base information.

Definition at line 737 of file JaggedVecConversions.h.

◆ m_payload

template<class PAYLOAD_T >
Payload_span SG::detail::JaggedVecConverter< PAYLOAD_T >::m_payload
private

The span over the payload vector.

Definition at line 740 of file JaggedVecConversions.h.


The documentation for this class was generated from the following file: