Arkanjo 0.1
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1
14#ifndef CONFIG_HPP
15#define CONFIG_HPP
16
17#include <string>
18using namespace std;
19
26class Config {
27 string base_path = "tmp";
28
29protected:
30 static Config* config_;
31
36
37public:
41 Config(Config &other) = delete;
42
46 void operator=(const Config &) = delete;
47
52 static Config *config();
53
58 string getBasePath();
59
65 void setTestConfig();
66
70 void setDefaultConfig();
71};
72
73#endif
Singleton configuration manager class.
Definition config.hpp:26
Config(Config &other)=delete
Deleted copy constructor.
void setDefaultConfig()
Sets default production configuration paths.
Definition config.cpp:12
static Config * config()
Gets the singleton configuration instance.
Definition config.cpp:18
void setTestConfig()
Sets test configuration paths.
Definition config.cpp:8
static Config * config_
Static instance pointer for singleton pattern.
Definition config.hpp:30
string getBasePath()
Gets the current base path.
Definition config.cpp:4
void operator=(const Config &)=delete
Deleted assignment operator.
Config()
Protected constructor for singleton pattern.
Definition config.hpp:35
Definition json.hpp:5678