#include <Config.hpp>
◆ Config() [1/3]
| config::Config::Config |
( |
| ) |
|
◆ Config() [2/3]
| config::Config::Config |
( |
const Config & |
| ) |
|
|
delete |
◆ Config() [3/3]
| config::Config::Config |
( |
Config && |
| ) |
|
|
delete |
◆ ~Config()
| virtual config::Config::~Config |
( |
| ) |
|
|
virtualdefault |
◆ GetAppLogPath()
| const std::string & config::Config::GetAppLogPath |
( |
| ) |
const |
◆ GetAppName()
| const std::string & config::Config::GetAppName |
( |
| ) |
const |
|
inline |
◆ GetColorConfig()
| void config::Config::GetColorConfig |
( |
const json & |
j | ) |
|
|
private |
◆ GetColumns()
| const std::vector< ColumnConfig > & config::Config::GetColumns |
( |
| ) |
const |
◆ GetConfigFilePath()
| const std::string & config::Config::GetConfigFilePath |
( |
| ) |
const |
◆ GetConfigVersion()
Get the current config version.
- Returns
- The version of the config file
◆ GetDefaultAppPath()
| std::filesystem::path config::Config::GetDefaultAppPath |
( |
| ) |
|
Get the default application path.
- Returns
- Path to the default application directory
◆ GetDefaultConfigPath()
| std::filesystem::path config::Config::GetDefaultConfigPath |
( |
| ) |
|
|
private |
◆ GetDefaultLogPath()
| std::filesystem::path config::Config::GetDefaultLogPath |
( |
| ) |
|
|
private |
◆ GetDictionaryFilePath()
| const std::string & config::Config::GetDictionaryFilePath |
( |
| ) |
const |
Get the dictionary file path.
- Returns
- Path to the field dictionary file
◆ GetFieldTranslator()
Get the field translator for value conversions.
- Returns
- Reference to the FieldTranslator instance
◆ GetFilterConfig()
| void config::Config::GetFilterConfig |
( |
const json & |
j | ) |
|
|
private |
◆ GetLoggingConfig()
| void config::Config::GetLoggingConfig |
( |
const json & |
j | ) |
|
|
private |
◆ GetMutableColumns()
| std::vector< ColumnConfig > & config::Config::GetMutableColumns |
( |
| ) |
|
◆ GetMutableFieldTranslator()
Get mutable field translator for editing dictionary.
- Returns
- Mutable reference to the FieldTranslator instance
◆ GetParserConfig()
| const json & config::Config::GetParserConfig |
( |
const json & |
j | ) |
|
|
private |
◆ GetPrintConfig()
| void config::Config::GetPrintConfig |
( |
| ) |
const |
◆ LoadConfig()
| void config::Config::LoadConfig |
( |
| ) |
|
Throws if the config file is not valid JSON (in-memory settings are kept).
◆ MergeConfigs()
| json config::Config::MergeConfigs |
( |
const json & |
userConfig, |
|
|
const json & |
defaultConfig |
|
) |
| |
|
private |
Merge new fields from default config into user config.
- Parameters
-
| userConfig | User's existing config |
| defaultConfig | Default config from application |
- Returns
- Merged config with user values preserved and new fields added
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ParseXmlConfig()
| void config::Config::ParseXmlConfig |
( |
const json & |
j | ) |
|
|
private |
◆ Reload()
| void config::Config::Reload |
( |
| ) |
|
Reload configuration from file.
Convenience method that calls LoadConfig() to reload the configuration from the current config file path.
◆ SaveConfig()
| void config::Config::SaveConfig |
( |
| ) |
|
Replaces the file atomically. If the last load failed to parse it, the file is first copied to "<config>.bak" (nothing is written if that fails).
◆ SetAppName()
| void config::Config::SetAppName |
( |
const std::string & |
name | ) |
|
◆ SetConfigFilePath()
| void config::Config::SetConfigFilePath |
( |
const std::string & |
path | ) |
|
◆ SetConfigVersion()
Set the config version.
- Parameters
-
| version | The version to set |
◆ SetDictionaryFilePath()
| void config::Config::SetDictionaryFilePath |
( |
const std::string & |
path | ) |
|
Set the dictionary file path and reload dictionary.
- Parameters
-
| path | Path to the field dictionary file |
◆ SetupLogPath()
| void config::Config::SetupLogPath |
( |
| ) |
|
|
private |
◆ actorField
| std::string config::Config::actorField {"actor"} |
◆ appName
| std::string config::Config::appName {"LogViewer"} |
◆ columnColors
◆ columnOrder
| std::vector<std::string> config::Config::columnOrder |
◆ columns
◆ columnWidths
| std::map<std::string, int> config::Config::columnWidths |
◆ itemHighlights
◆ logLevel
| std::string config::Config::logLevel {"debug"} |
◆ m_configFilePath
| std::string config::Config::m_configFilePath {"config.json"} |
|
private |
◆ m_configVersion
◆ m_dictionaryFilePath
| std::string config::Config::m_dictionaryFilePath {"field_dictionary.json"} |
|
private |
◆ m_fieldTranslator
◆ m_loadFailed
| bool config::Config::m_loadFailed {false} |
|
private |
◆ m_logPath
| std::string config::Config::m_logPath {"log.txt"} |
|
private |
◆ typeFilterField
| std::string config::Config::typeFilterField {} |
◆ updates
The documentation for this class was generated from the following files: