BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SysUtils.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Base/Utils/SysUtils.h
6 //! @brief Defines various stuff in namespace Utils.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_BASE_UTILS_SYSUTILS_H
16 #define BORNAGAIN_BASE_UTILS_SYSUTILS_H
17 
18 #include <string>
19 
20 //! Utility functions getCurrentDateAndTime, enableFloatingPointExceptions.
21 
22 namespace SysUtils
23 {
24 
25 std::string getCurrentDateAndTime();
26 
27 //! Enables exception throw in the case of NaN, Inf.
29 
30 //! Returns environment variable.
31 std::string getenv(const std::string& name);
32 
33 //! Returns true if operation system is Windows.
34 bool isWindowsHost();
35 
36 } // namespace SysUtils
37 
38 #endif // BORNAGAIN_BASE_UTILS_SYSUTILS_H
Utility functions getCurrentDateAndTime, enableFloatingPointExceptions.
Definition: SysUtils.h:23
std::string getCurrentDateAndTime()
Definition: SysUtils.cpp:22
std::string getenv(const std::string &name)
Returns environment variable.
Definition: SysUtils.cpp:48
void enableFloatingPointExceptions()
Enables exception throw in the case of NaN, Inf.
Definition: SysUtils.cpp:33
bool isWindowsHost()
Returns true if operation system is Windows.
Definition: SysUtils.cpp:56