Elements  6.2
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 
Elements::Module::patchVersion
static std::uint_least64_t patchVersion()
Definition: Module.h:57
std::string
STL class.
Elements::Module::majorVersion
static std::uint_least64_t majorVersion()
Definition: Module.h:51
Elements::Module::versionString
static std::string versionString()
Definition: Module.h:45
Elements::Kernel::Units::m
constexpr double m
Definition: SystemOfUnits.h:79
Elements::operator<<
ELEMENTS_API std::ostream & operator<<(std::ostream &, const Environment::Variable &)
Definition: Environment.cpp:295
std::ostream
STL class.
Elements::Module::minorVersion
static std::uint_least64_t minorVersion()
Definition: Module.h:54
Elements::Module::name
static std::string name()
Definition: Module.h:42
std::uint_least64_t
std::endl
T endl(T... args)
Elements::Module::version
static std::uint_least64_t version()
Definition: Module.h:48
Elements::Module
Definition: Module.h:41
Elements
Definition: callBackExample.h:35