Jpp  17.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JClassDef.hh
Go to the documentation of this file.
1 #ifndef __JROOT__JCLASSDEF__
2 #define __JROOT__JCLASSDEF__
3 
4 #include "TObject.h"
5 
6 /**
7  * \author mdejong
8  */
9 
10 namespace JROOT {}
11 namespace JPP { using namespace JROOT; }
12 
13 namespace JROOT {
14 
15  /**
16  * Test ROOT ClassDef.
17  */
18  template <class T>
19  class JClassDef
20  {
21  typedef char JSmall;
22  typedef long JBig;
23 
24  template<class C, C> struct check_type;
25 
26  template<class C> static JSmall JTest(check_type<const char* (C::*)(), &C::Class_Name>*);
27  template<class C> static JBig JTest(...);
28 
29  public:
30  enum { value = sizeof(JTest<T>(0)) == sizeof(JSmall) }; //!< true if ROOT compatible class; else false
31  };
32 }
33 
34 #endif
static const double C
Physics constants.
Auxiliary base class for compile time evaluation of test.
Definition: JTest.hh:21
static JSmall JTest(check_type< const char *(C::*)(),&C::Class_Name > *)
Test ROOT ClassDef.
Definition: JClassDef.hh:19