Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JDetector/JVersion.hh
Go to the documentation of this file.
1#ifndef __JDETECTOR__JVERSION__
2#define __JDETECTOR__JVERSION__
3
4#include <string>
5
7
8
9/**
10 * \author mdejong
11 */
12
13namespace JDETECTOR {}
14namespace JPP { using namespace JDETECTOR; }
15
16namespace JDETECTOR {
17
19
20
21 /**
22 * Auxiliary class for version identifier.
23 */
24 struct JVersion :
25 public JComparable<JVersion>
26 {
27 /**
28 * Default constructor.
29 */
31 version()
32 {}
33
34
35 /**
36 * Constructor.
37 *
38 * \param version version
39 */
40 JVersion(const std::string& version) :
42 {}
43
44
45 /**
46 * Get version.
47 *
48 * \return version
49 */
50 const std::string& getVersion() const
51 {
52 return this->version;
53 }
54
55
56 /**
57 * Set version.
58 *
59 * \param version version
60 */
61 void setVersion(const std::string& version)
62 {
63 this->version = version;
64 }
65
66
67 /**
68 * Less-than method.
69 *
70 * \param version version
71 * \result true if this version less than given version; else false
72 */
73 inline bool less(const JVersion& version) const
74 {
75 return this->getVersion() < version.getVersion();
76 }
77
78 protected:
79 std::string version;
80 };
81}
82
83#endif
file Auxiliary data structures and methods for detector calibration.
Definition JAnchor.hh:12
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary class for version identifier.
void setVersion(const std::string &version)
Set version.
JVersion()
Default constructor.
JVersion(const std::string &version)
Constructor.
bool less(const JVersion &version) const
Less-than method.
const std::string & getVersion() const
Get version.
Template definition of auxiliary base class for comparison of data structures.