Jpp
JCategory.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JCATEGORY
2 #define __JLANG__JCATEGORY
3 
4 
5 /**
6  * \author mdejong
7  */
8 
9 namespace JLANG {}
10 namespace JPP { using namespace JLANG; }
11 
12 namespace JLANG {
13 
14  /**
15  * Auxiliary class to define value, reference and pointer types for given data type and category.
16  */
17  template<class T, bool is_modifiable>
18  struct JCategory;
19 
20  /**
21  * Specialisation of JCategory for modifiable (i.e. non-constant) data type.
22  */
23  template<class T>
24  struct JCategory<T, true> {
25  typedef T value_type;
26  typedef T& reference_type;
27  typedef T* pointer_type;
28  };
29 
30  /**
31  * Specialisation of JCategory for constant (i.e. non-modifiable) data type.
32  */
33  template<class T>
34  struct JCategory<T, false> {
35  typedef const T value_type;
36  typedef const T& reference_type;
37  typedef const T* pointer_type;
38  };
39 }
40 
41 #endif
JLANG::JCategory< T, false >::value_type
const typedef T value_type
Definition: JCategory.hh:35
JLANG::JCategory< T, true >::pointer_type
T * pointer_type
Definition: JCategory.hh:27
JLANG::JCategory
Auxiliary class to define value, reference and pointer types for given data type and category.
Definition: JCategory.hh:18
JLANG::JCategory< T, true >::reference_type
T & reference_type
Definition: JCategory.hh:26
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition: JAAnetToolkit.hh:37
JLANG::JCategory< T, false >::pointer_type
const typedef T * pointer_type
Definition: JCategory.hh:37
JLANG::JCategory< T, true >::value_type
T value_type
Definition: JCategory.hh:25
JLANG::JCategory< T, false >::reference_type
const typedef T & reference_type
Definition: JCategory.hh:36
JLANG
Auxiliary classes and methods for language specific functionality.
Definition: JAbstractClass.hh:10