Arkanjo 0.2
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
config.hpp
Go to the documentation of this file.
1
14#pragma once
15
16#include <string>
17#include <filesystem>
18
20
21namespace fs = std::filesystem;
22
23#ifndef THIRD_PARTY_DIR
24 #define THIRD_PARTY_DIR "third-party"
25#endif
26
33class Config {
34 protected:
38 Config() = default;
39
40 public:
41 std::string program_name{"arkanjo"};
42 fs::path base_path{"tmp/arkanjo"};
43 fs::path third_party_dir{"third-party"};
44 fs::path name_container{"default"};
46
50 Config(const Config&) = delete;
51
55 Config& operator=(const Config&) = delete;
56
61 static Config& config();
62
68 void setTestConfig();
69
73 void setDefaultConfig();
74};
Singleton configuration manager class.
Definition config.hpp:33
static Config & config()
Gets the singleton configuration instance.
Definition config.cpp:37
Config()=default
Protected constructor for singleton pattern.
void setDefaultConfig()
Sets default production configuration paths.
Definition config.cpp:10
config::Theme theme
Current terminal theme.
Definition config.hpp:45
Config(const Config &)=delete
Deleted copy constructor.
void setTestConfig()
Sets test configuration paths.
Definition config.cpp:6
std::string program_name
Name of the program.
Definition config.hpp:41
Config & operator=(const Config &)=delete
Deleted assignment operator.
fs::path third_party_dir
Directory containing third-party dependencies.
Definition config.hpp:43
fs::path base_path
Default base path for temporary files.
Definition config.hpp:42
fs::path name_container
Name of the cache container.
Definition config.hpp:44