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