ATLAS Offline Software
Loading...
Searching...
No Matches
ExpressionParsing::MethodHelper< T_Cont, T_src > Class Template Reference

Auxiliary class to handle method calls of "scalar" containers (AuxElement). More...

#include <MethodAccessor.h>

Collaboration diagram for ExpressionParsing::MethodHelper< T_Cont, T_src >:

Classes

class  Kit
 Auxiliary class to create the corresponding auxiliary helper object. More...

Public Member Functions

 MethodHelper (const RootUtils::TSMethodCall &method_call, const void *data)
std::size_t size (const T_Cont &cont) const
T_src get (const T_Cont &) const
 Get the scalar provided by the container.
T_src get (const T_Cont &, std::size_t idx) const
 Get the specified element of the vector provided by the container.

Private Attributes

RootUtils::TSMethodCall m_methodCall ATLAS_THREAD_SAFE
const void * m_data

Detailed Description

template<class T_Cont, typename T_src>
class ExpressionParsing::MethodHelper< T_Cont, T_src >

Auxiliary class to handle method calls of "scalar" containers (AuxElement).

Definition at line 91 of file MethodAccessor.h.

Constructor & Destructor Documentation

◆ MethodHelper()

template<class T_Cont, typename T_src>
ExpressionParsing::MethodHelper< T_Cont, T_src >::MethodHelper ( const RootUtils::TSMethodCall & method_call,
const void * data )
inline

Definition at line 93 of file MethodAccessor.h.

96 {
97 // cppcheck-suppress assertWithSideEffect
98 assert( m_methodCall.call() != nullptr );
99 }
Auxiliary class to handle method calls of "scalar" containers (AuxElement).

Member Function Documentation

◆ get() [1/2]

template<class T_Cont, typename T_src>
T_src ExpressionParsing::MethodHelper< T_Cont, T_src >::get ( const T_Cont & ) const
inline

Get the scalar provided by the container.

Definition at line 106 of file MethodAccessor.h.

106 {
107 T_src ret;
108 void* data_nc ATLAS_THREAD_SAFE = const_cast<void *>(m_data); // required by TMethodCall
109 m_methodCall.call()->Execute(data_nc, ret);
110 return ret;
111 }
RootUtils::TSMethodCall m_methodCall ATLAS_THREAD_SAFE

◆ get() [2/2]

template<class T_Cont, typename T_src>
T_src ExpressionParsing::MethodHelper< T_Cont, T_src >::get ( const T_Cont & ,
std::size_t idx ) const
inline

Get the specified element of the vector provided by the container.

Definition at line 114 of file MethodAccessor.h.

114 {
115 T_src ret;
116 assert( idx==0);
117 void* data_nc ATLAS_THREAD_SAFE = const_cast<void *>(m_data); // required by TMethodCall
118 m_methodCall.call()->Execute(data_nc, ret);
119 return ret;
120 }

◆ size()

template<class T_Cont, typename T_src>
std::size_t ExpressionParsing::MethodHelper< T_Cont, T_src >::size ( const T_Cont & cont) const
inline

Definition at line 101 of file MethodAccessor.h.

101 {
102 return getContainerSize(cont); //@TODO correct ? or 1 ?
103 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

template<class T_Cont, typename T_src>
RootUtils::TSMethodCall m_methodCall ExpressionParsing::MethodHelper< T_Cont, T_src >::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 136 of file MethodAccessor.h.

◆ m_data

template<class T_Cont, typename T_src>
const void* ExpressionParsing::MethodHelper< T_Cont, T_src >::m_data
private

Definition at line 137 of file MethodAccessor.h.


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