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

Auxiliary class to handle method calls of vector containers (AuxVectorBase) More...

#include <MethodAccessor.h>

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

Classes

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

Public Member Functions

 CollectionMethodHelper (const RootUtils::ClingCallWrapper< T_src > &method_wrapper, const TVirtualCollectionProxy &collection_proxy, const void *data, unsigned int n_elements)
std::size_t size (const T_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::ClingCallWrapper< T_src > m_methodWrapper
std::unique_ptr< TVirtualCollectionProxy > m_collectionProxy

Detailed Description

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

Auxiliary class to handle method calls of vector containers (AuxVectorBase)

Definition at line 31 of file MethodAccessor.h.

Constructor & Destructor Documentation

◆ CollectionMethodHelper()

template<class T_Cont, typename T_src>
ExpressionParsing::CollectionMethodHelper< T_Cont, T_src >::CollectionMethodHelper ( const RootUtils::ClingCallWrapper< T_src > & method_wrapper,
const TVirtualCollectionProxy & collection_proxy,
const void * data,
unsigned int n_elements )
inline

Definition at line 33 of file MethodAccessor.h.

39 {
40 void* data_nc ATLAS_THREAD_SAFE = const_cast<void *>(data); // required by TVirtualCollectionProxy
41 m_collectionProxy->PushProxy(data_nc);
43 }
Auxiliary class to handle method calls of vector containers (AuxVectorBase)
std::unique_ptr< TVirtualCollectionProxy > m_collectionProxy
RootUtils::ClingCallWrapper< T_src > m_methodWrapper

Member Function Documentation

◆ get() [1/2]

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

Get the scalar provided by the container.

Definition at line 50 of file MethodAccessor.h.

50 {
51 assert( m_collectionProxy->Size() == 1);
53 return ret;
54 }

◆ get() [2/2]

template<class T_Cont, typename T_src>
T_src ExpressionParsing::CollectionMethodHelper< 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 57 of file MethodAccessor.h.

57 {
58 void *element_data=(*m_collectionProxy)[idx];
60 return ret;
61 }

◆ size()

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

Definition at line 45 of file MethodAccessor.h.

45 {
46 return m_collectionProxy->Size();
47 }

Member Data Documentation

◆ m_collectionProxy

template<class T_Cont, typename T_src>
std::unique_ptr<TVirtualCollectionProxy> ExpressionParsing::CollectionMethodHelper< T_Cont, T_src >::m_collectionProxy
private

Definition at line 87 of file MethodAccessor.h.

◆ m_methodWrapper

template<class T_Cont, typename T_src>
RootUtils::ClingCallWrapper<T_src> ExpressionParsing::CollectionMethodHelper< T_Cont, T_src >::m_methodWrapper
private

Definition at line 86 of file MethodAccessor.h.


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