Jpp 21.0.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JROOT::JActionAtFileRead< T > Class Template Reference

Auxiliary class to handle version management of given class at reading from a ROOT file. More...

#include <JRootSupportkit.hh>

Inheritance diagram for JROOT::JActionAtFileRead< T >:
JLANG::JTest

Static Public Member Functions

static void execute (T *object)
 Execute action.
 

Static Public Attributes

static const bool has_method = JTEST(test<T>(NULL))
 true if class has policy method actionAtFileRead; else false
 

Static Private Member Functions

template<class U >
static JTrue test (JTypecheck< void(U::*)(), &U::actionAtFileRead > *)
 
static void execute (T *object, std::true_type option)
 Execute action.
 
static void execute (T *object, std::false_type option)
 Execute action.
 
static JFalse test (...)
 default false
 

Detailed Description

template<class T>
class JROOT::JActionAtFileRead< T >

Auxiliary class to handle version management of given class at reading from a ROOT file.

Definition at line 86 of file JRootSupportkit.hh.

Member Function Documentation

◆ test() [1/2]

template<class T >
template<class U >
static JTrue JROOT::JActionAtFileRead< T >::test ( JTypecheck< void(U::*  )(), &U::actionAtFileRead > *)
staticprivate

◆ execute() [1/3]

template<class T >
static void JROOT::JActionAtFileRead< T >::execute ( T * object,
std::true_type option )
inlinestaticprivate

Execute action.

This implementation transfers the action to the given object.

Parameters
objectpointer to object (I/O)
optiontrue

Definition at line 102 of file JRootSupportkit.hh.

103 {
104 object->actionAtFileRead();
105 }

◆ execute() [2/3]

template<class T >
static void JROOT::JActionAtFileRead< T >::execute ( T * object,
std::false_type option )
inlinestaticprivate

Execute action.

This implementation does nothing.

Parameters
objectpointer to object (I/O)
optionfalse

Definition at line 116 of file JRootSupportkit.hh.

117 {}

◆ execute() [3/3]

template<class T >
static void JROOT::JActionAtFileRead< T >::execute ( T * object)
inlinestatic

Execute action.

Parameters
objectpointer to object (I/O)

Definition at line 129 of file JRootSupportkit.hh.

130 {
131 execute(object, std::bool_constant<has_method>());
132 }
static void execute(T *object, std::true_type option)
Execute action.

◆ test() [2/2]

template<class T >
static JFalse JLANG::JTest::test ( ...)
staticprivate

default false

Member Data Documentation

◆ has_method

template<class T >
const bool JROOT::JActionAtFileRead< T >::has_method = JTEST(test<T>(NULL))
static

true if class has policy method actionAtFileRead; else false

Definition at line 121 of file JRootSupportkit.hh.


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