Arkanjo 0.2
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
Config Class Reference

Singleton configuration manager class. More...

#include <config.hpp>

Public Member Functions

 Config (const Config &)=delete
 Deleted copy constructor.
 
Configoperator= (const Config &)=delete
 Deleted assignment operator.
 
void setTestConfig ()
 Sets test configuration paths.
 
void setDefaultConfig ()
 Sets default production configuration paths.
 

Static Public Member Functions

static Configconfig ()
 Gets the singleton configuration instance.
 

Public Attributes

std::string program_name {"arkanjo"}
 Name of the program.
 
fs::path base_path {"tmp/arkanjo"}
 Default base path for temporary files.
 
fs::path third_party_dir {"third-party"}
 Directory containing third-party dependencies.
 
fs::path name_container {"default"}
 Name of the cache container.
 
config::Theme theme {config::Theme::Dark}
 Current terminal theme.
 

Protected Member Functions

 Config ()=default
 Protected constructor for singleton pattern.
 

Detailed Description

Singleton configuration manager class.

Manages application paths and runtime configuration settings. Implements the singleton pattern to ensure single instance access.

Definition at line 33 of file config.hpp.

Constructor & Destructor Documentation

◆ Config() [1/2]

Config::Config ( )
protecteddefault

Protected constructor for singleton pattern.

◆ Config() [2/2]

Config::Config ( const Config & )
delete

Deleted copy constructor.

Member Function Documentation

◆ config()

Config & Config::config ( )
static

Gets the singleton configuration instance.

Returns
Returns the global configuration instance

Definition at line 37 of file config.cpp.

◆ operator=()

Config & Config::operator= ( const Config & )
delete

Deleted assignment operator.

◆ setDefaultConfig()

void Config::setDefaultConfig ( )

Sets default production configuration paths.

Definition at line 10 of file config.cpp.

◆ setTestConfig()

void Config::setTestConfig ( )

Sets test configuration paths.

Configures paths for end-to-end testing environment.

Definition at line 6 of file config.cpp.

Member Data Documentation

◆ base_path

fs::path Config::base_path {"tmp/arkanjo"}

Default base path for temporary files.

Definition at line 42 of file config.hpp.

◆ name_container

fs::path Config::name_container {"default"}

Name of the cache container.

Definition at line 44 of file config.hpp.

◆ program_name

std::string Config::program_name {"arkanjo"}

Name of the program.

Definition at line 41 of file config.hpp.

◆ theme

Current terminal theme.

Definition at line 45 of file config.hpp.

◆ third_party_dir

fs::path Config::third_party_dir {"third-party"}

Directory containing third-party dependencies.

Definition at line 43 of file config.hpp.


The documentation for this class was generated from the following files: