Elements  6.0.1
A C++ base framework for the Euclid Software.
Module.h
Go to the documentation of this file.
1 
27 #ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_MODULE_H_
28 #define ELEMENTSKERNEL_ELEMENTSKERNEL_MODULE_H_
29 
30 #include <algorithm> // for for_each
31 #include <cstdint> // for uing_least64_t
32 #include <iostream> // for ostream
33 #include <string> // for string
34 #include <vector> // for vector
35 
36 #include "ThisElementsModule.h" // local module constants generated
37  // by the build system
38 
39 namespace Elements {
40 
41 struct Module {
42  static inline std::string name() {
43  return THIS_MODULE_NAME_STRING;
44  }
45  static inline std::string versionString() {
46  return THIS_MODULE_VERSION_STRING;
47  }
48  static inline std::uint_least64_t version() {
49  return THIS_MODULE_VERSION;
50  }
52  return THIS_MODULE_MAJOR_VERSION;
53  }
55  return THIS_MODULE_MINOR_VERSION;
56  }
58  return THIS_MODULE_PATCH_VERSION;
59  }
60 };
61 
62 inline std::ostream& operator<<(std::ostream& stream, const Module& m) {
63 
64  stream << "Name: " << m.name() << std::endl;
65  stream << "Version String: " << m.versionString() << std::endl;
66  stream << "Version: " << m.version() << std::endl;
67  stream << "Major Version: " << m.majorVersion() << std::endl;
68  stream << "Minor Version: " << m.minorVersion() << std::endl;
69  stream << "Patch Version: " << m.patchVersion() << std::endl;
70 
71  return stream;
72 }
73 
74 } // namespace Elements
75 
76 #endif // ELEMENTSKERNEL_ELEMENTSKERNEL_MODULE_H_
77 
T endl(T... args)
constexpr double m
Definition: SystemOfUnits.h:79
ELEMENTS_API std::ostream & operator<<(std::ostream &, const Environment::Variable &)
static std::uint_least64_t majorVersion()
Definition: Module.h:51
static std::uint_least64_t version()
Definition: Module.h:48
static std::uint_least64_t minorVersion()
Definition: Module.h:54
static std::string name()
Definition: Module.h:42
static std::string versionString()
Definition: Module.h:45
static std::uint_least64_t patchVersion()
Definition: Module.h:57