2015-11-08 19:18:14 +01:00
|
|
|
#ifndef CLIB_PROGRAM_CONFIG_H
|
|
|
|
|
#define CLIB_PROGRAM_CONFIG_H
|
2015-11-08 14:45:05 +01:00
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
namespace Pol
|
|
|
|
|
{
|
|
|
|
|
namespace Clib
|
|
|
|
|
{
|
2015-11-08 19:18:14 +01:00
|
|
|
class ProgramConfig
|
2015-11-08 14:45:05 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2018-11-03 15:00:44 +01:00
|
|
|
ProgramConfig() = default;
|
|
|
|
|
virtual ~ProgramConfig() = default;
|
2015-11-08 14:45:05 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Returns the name of the currently running program
|
|
|
|
|
*/
|
|
|
|
|
static std::string programName();
|
2015-11-08 14:45:05 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Returns the directory of the currently running program
|
|
|
|
|
*/
|
|
|
|
|
static std::string programDir();
|
2015-11-08 14:45:05 +01:00
|
|
|
|
2018-06-18 10:27:01 +02:00
|
|
|
static std::string build_target();
|
|
|
|
|
static std::string build_datetime();
|
2016-02-19 19:26:35 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Configures the bug reporting system
|
|
|
|
|
*/
|
2016-12-15 16:59:58 +01:00
|
|
|
static void configureProgramEnvironment( const std::string& programName );
|
2015-11-08 14:45:05 +01:00
|
|
|
|
|
|
|
|
private:
|
2016-02-19 19:26:35 +01:00
|
|
|
static std::string m_programName;
|
|
|
|
|
static std::string m_programDir;
|
2015-11-08 14:45:05 +01:00
|
|
|
};
|
2018-11-03 15:00:44 +01:00
|
|
|
} // namespace Clib
|
|
|
|
|
} // namespace Pol
|
2015-11-08 14:45:05 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
#define PROG_CONFIG Pol::Clib::ProgramConfig
|
2015-11-08 14:45:05 +01:00
|
|
|
|
2016-02-19 19:26:35 +01:00
|
|
|
#endif // CLIB_PROGRAM_CONFIG_H
|