Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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
9namespace JLANG {}
10namespace JPP { using namespace JLANG; }
11
12namespace 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_constant>
18 struct JCategory;
19
20 /**
21 * Specialisation of JCategory for constant (i.e.\ non-modifiable) data type.
22 */
23 template<class T>
24 struct JCategory<T, true> {
25 typedef const T value_type;
26 typedef const T& reference_type;
27 typedef const T* pointer_type;
28 };
29
30 /**
31 * Specialisation of JCategory for modifiable (i.e.\ non-constant) data type.
32 */
33 template<class T>
34 struct JCategory<T, false> {
35 typedef T value_type;
36 typedef T& reference_type;
37 typedef T* pointer_type;
38 };
39}
40
41#endif
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class to define value, reference and pointer types for given data type and category.
Definition JCategory.hh:18