Jpp
JAbstractClass.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JABSTRACTCLASS__
2 #define __JLANG__JABSTRACTCLASS__
3 
4 #include "JLang/JTest.hh"
5 
6 /**
7  * \author mdejong
8  */
9 
10 namespace JLANG {}
11 namespace JPP { using namespace JLANG; }
12 
13 namespace JLANG {
14 
15  /**
16  * Template class test for abstractness.
17  */
18  template<class T>
20  public JTest
21  {
22  using JTest::test;
23 
24  template<class U>
25  static JTrue test(U (*)[1]);
26 
27  public:
28  static const bool is_abstract = !JTEST(test<T>(0)); //!< true of class is abstract; else false
29  };
30 }
31 
32 #endif
JLANG::JTest::JTrue
definition of true
Definition: JTest.hh:24
JLANG::JTest::test
static JFalse test(...)
default false
JLANG::JTest
Auxiliary base class for compile time evaluation of test.
Definition: JTest.hh:21
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JTEST
#define JTEST(__A__)
Test macro.
Definition: JTest.hh:45
JLANG::JAbstractClass::is_abstract
static const bool is_abstract
true of class is abstract; else false
Definition: JAbstractClass.hh:28
JLANG::JAbstractClass
Template class test for abstractness.
Definition: JAbstractClass.hh:19
JLANG
Auxiliary classes and methods for language specific functionality.
Definition: JAbstractClass.hh:10
JLANG::JAbstractClass::test
static JTrue test(U(*)[1])
JTest.hh