CppBenchmark  1.0.4.0
C++ Benchmark Library
environment.h
Go to the documentation of this file.
1 
9 #ifndef CPPBENCHMARK_ENVIRONMENT_H
10 #define CPPBENCHMARK_ENVIRONMENT_H
11 
12 #include <ctime>
13 #include <string>
14 
15 namespace CppBenchmark {
16 
18 
23 {
24 public:
25  Environment() = delete;
26  Environment(const Environment&) = delete;
27  Environment(Environment&&) = delete;
28  ~Environment() = delete;
29 
30  Environment& operator=(const Environment&) = delete;
32 
34  static bool Is32BitOS();
36  static bool Is64BitOS();
37 
39  static bool Is32BitProcess();
41  static bool Is64BitProcess();
42 
44  static bool IsDebug();
46  static bool IsRelease();
47 
49  static bool IsBigEndian();
51  static bool IsLittleEndian();
52 
54  static std::string OSVersion();
55 
57  static std::string EndLine();
58 
60  static std::string UnixEndLine();
62  static std::string WindowsEndLine();
63 
65  static time_t Timestamp();
66 };
67 
68 } // namespace CppBenchmark
69 
70 #endif // CPPBENCHMARK_ENVIRONMENT_H
Environment management static class.
Definition: environment.h:23
static bool IsDebug()
Is compiled in debug mode?
Definition: environment.cpp:81
static std::string OSVersion()
Get OS version string.
static bool IsRelease()
Is compiled in release mode?
Definition: environment.cpp:86
static time_t Timestamp()
Get the current time in seconds.
static bool Is64BitProcess()
Is 64-bit running process?
Definition: environment.cpp:62
Environment & operator=(Environment &&)=delete
static bool IsLittleEndian()
Is little-endian system?
Environment(const Environment &)=delete
static std::string WindowsEndLine()
Get Windows text end line separator.
static std::string EndLine()
Get text end line separator.
static std::string UnixEndLine()
Get Unix text end line separator.
Environment & operator=(const Environment &)=delete
static bool Is64BitOS()
Is 64-bit OS?
Definition: environment.cpp:38
static bool Is32BitOS()
Is 32-bit OS?
Definition: environment.cpp:33
Environment(Environment &&)=delete
static bool Is32BitProcess()
Is 32-bit running process?
Definition: environment.cpp:57
static bool IsBigEndian()
Is big-endian system?
Definition: environment.cpp:95
C++ Benchmark project definitions.
Definition: barrier.h:15