BornAgain  1.19.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 reflection and scattering
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_BASE_UTILS_SYSUTILS_H
21 #define BORNAGAIN_BASE_UTILS_SYSUTILS_H
22 
23 #include <string>
24 
25 //! Utility functions getCurrentDateAndTime, enableFloatingPointExceptions.
26 
27 namespace SysUtils {
28 
29 std::string getCurrentDateAndTime();
30 
31 //! Enables exception throw in the case of NaN, Inf.
33 
34 //! Returns environment variable.
35 std::string getenv(const std::string& name);
36 
37 //! Returns true if operation system is Windows.
38 bool isWindowsHost();
39 
40 } // namespace SysUtils
41 
42 #endif // BORNAGAIN_BASE_UTILS_SYSUTILS_H
43 #endif // USER_API
QString const & name(EShape k)
Definition: particles.cpp:21
Utility functions getCurrentDateAndTime, enableFloatingPointExceptions.
Definition: SysUtils.h:27
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