Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Jpp.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JPP__
2 #define __JLANG__JPP__
3 
4 
5 /**
6  * \file
7  *
8  * Jpp meta data.
9  * \author mdejong
10  */
11 
12 /**
13  * Name space for KM3NeT
14  */
15 namespace KM3NET {}
16 
17 /**
18  * Name space for Antares
19  */
20 namespace ANTARES {}
21 
22 namespace JLANG {}
23 namespace JPP { using namespace JLANG; }
24 
25 namespace JLANG {
26 
27 #define KM3NET 1
28 #define ANTARES 2
29 
30  /**
31  * Get namespace.
32  *
33  * \return namespace
34  */
35  inline const char* getNamespace()
36  {
37 #if NAMESPACE == ANTARES
38  return "ANTARES";
39 #else
40  return "KM3NET";
41  #endif
42  }
43 
44 #undef KM3NET
45 #undef ANTARES
46 
47 
48  /**
49  * Get GIT version.
50  *
51  * \return GIT version.
52  */
53  inline const char* getGITVersion()
54  {
55 #ifdef GIT_VERSION
56  return GIT_VERSION;
57 #else
58  return "?";
59 #endif
60  }
61 
62 
63  /**
64  * Get GIT commit.
65  *
66  * \return GIT commit.
67  */
68  inline const char* getGITCommit()
69  {
70 #ifdef GIT_COMMIT
71  return GIT_COMMIT;
72 #else
73  return "?";
74 #endif
75  }
76 
77 
78  /**
79  * Get GIT date.
80  *
81  * \return GIT date.
82  */
83  inline const char* getGITDate()
84  {
85 #ifdef GIT_DATE
86  return GIT_DATE;
87 #else
88  return "?";
89 #endif
90  }
91 }
92 
93 #endif
#define ANTARES
Definition: Jpp.hh:28
const char * getGITCommit()
Get GIT commit.
Definition: Jpp.hh:68
const char * getGITDate()
Get GIT date.
Definition: Jpp.hh:83
std::string getNamespace(const std::string &type_name)
Get name space, i.e.
Definition: JeepToolkit.hh:207
#define KM3NET
Definition: Jpp.hh:27
const char * getGITVersion()
Get GIT version.
Definition: Jpp.hh:53