Jpp  17.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions | Static Public Attributes | Static Protected Member Functions | Static Private Member Functions | List of all members
JROOT::JActionAtFileOpen< T > Class Template Reference

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

#include <JRootSupportkit.hh>

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

Static Public Member Functions

static void execute (TFile *file)
 Execute action. More...
 

Static Public Attributes

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

Static Protected Member Functions

static JFalse test (...)
 default false More...
 

Static Private Member Functions

template<class U >
static JTrue test (JTypecheck< void(*)(int),&U::actionAtFileOpen > *)
 
static void execute (TFile *file, JBool< true > option)
 Execute action. More...
 
static void execute (TFile *file, JBool< false > option)
 Execute action. More...
 

Detailed Description

template<class T>
class JROOT::JActionAtFileOpen< T >

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

Definition at line 31 of file JRootSupportkit.hh.

Member Function Documentation

template<class T >
template<class U >
static JTrue JROOT::JActionAtFileOpen< T >::test ( JTypecheck< void(*)(int),&U::actionAtFileOpen > *  )
staticprivate
template<class T >
static void JROOT::JActionAtFileOpen< T >::execute ( TFile *  file,
JBool< true >  option 
)
inlinestaticprivate

Execute action.

This implementation transfers the action to the given class.

Parameters
filepointer to file
optiontrue

Definition at line 47 of file JRootSupportkit.hh.

48  {
49  T::actionAtFileOpen(getStreamerVersion(file, T::Class_Name()));
50  }
int getStreamerVersion(TFile *file, const char *name)
Get ROOT streamer version of class with given name.
void actionAtFileOpen(TFile *file)
General action method at file open.
template<class T >
static void JROOT::JActionAtFileOpen< T >::execute ( TFile *  file,
JBool< false >  option 
)
inlinestaticprivate

Execute action.

This implementation does nothing.

Parameters
filepointer to file
optionfalse

Definition at line 61 of file JRootSupportkit.hh.

62  {}
template<class T >
static void JROOT::JActionAtFileOpen< T >::execute ( TFile *  file)
inlinestatic

Execute action.

Parameters
filepointer to file

Definition at line 74 of file JRootSupportkit.hh.

75  {
76  execute(file, JBool<has_method>());
77  }
static void execute(TFile *file, JBool< true > option)
Execute action.
static JFalse JLANG::JTest::test (   ...)
staticprotectedinherited

default false

Member Data Documentation

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

true if class has policy method actionAtFileOpen; else false

Definition at line 66 of file JRootSupportkit.hh.


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