Struct IConfig#
Defined in File config.h
Inheritance Relationships#
Derived Type#
public CAppConfig
(Class CAppConfig)
Struct Documentation#
-
struct IConfig#
Application configuration.
- Attention
This interface is available for the standalone and essential application. The main, isolated and maintenance applications cannot use this interface.
Subclassed by CAppConfig
Public Functions
-
virtual EConfigProcessResult ProcessConfig(const sdv::u8string &ssContent) = 0#
Process the provided configuration by loading modules and creating objects/stubs/proxies defined in the configuration string. Processing a configuration resets the baseline before processing.
- Attention
Configuration changes can only occur when the system is in configuration mode.
- Parameters:
ssContent – [in] The contents of the configuration file (TOML).
- Returns:
Returns a config process result enum value.
-
virtual EConfigProcessResult LoadConfig(const sdv::u8string &ssConfigPath) = 0#
Read file pointed to by the provided file path and load modules and create components as defined in the configuration file. Loading a configuration resets the baseline before processing.
- Attention
Configuration changes can only occur when the system is in configuration mode.
- Parameters:
ssConfigPath – [in] Path to the file containing the configuration (TOML). The path can be an absolute as well as a relative path. In case a relative path is provided, the executable directory is searched as well as all directories supplied through the AddConfigSearchDir function.
- Returns:
Returns a config process result enum value.
-
virtual bool SaveConfig(const sdv::u8string &ssConfigPath) const = 0#
Save a configuration file pointed to by the provided file path. All components are saved that were added after the last baseline with the configuration specific settings.
- Attention
Configuration changes can only occur when the system is in configuration mode.
- Parameters:
ssConfigPath – [in] Path to the file containing the configuration (TOML). The path can be an absolute as well as a relative path. In case a relative path is provided, the configuration is stored relative to the executable directory.
- Returns:
Returns ‘true’ on success; ‘false’ otherwise.
-
virtual bool AddConfigSearchDir(const sdv::u8string &ssDir) = 0#
Add a search path to a folder where a config file can be found.
- Parameters:
ssDir – [in] Relative or absolute path to an existing folder.
- Returns:
Returns ‘true’ on success; ‘false’ otherwise.
-
virtual void ResetConfigBaseline() = 0#
Reset the configuration baseline.
The configuration baseline determines what belongs to the current configuration. Any object being added after this baseline will be stored in a configuration file.
- EConfigProcessResult ProcessConfig (in u8string ssContent)
Process the provided configuration by loading modules and creating objects/stubs/proxies defined in the configuration string. Processing a configuration resets the baseline before processing.
- Attention
Configuration changes can only occur when the system is in configuration mode.
- Parameters:
ssContent – [in] The contents of the configuration file (TOML).
- Returns:
Returns a config process result enum value.
- EConfigProcessResult LoadConfig (in u8string ssConfigPath)
Read file pointed to by the provided file path and load modules and create components as defined in the configuration file. Loading a configuration resets the baseline before processing.
- Attention
Configuration changes can only occur when the system is in configuration mode.
- Parameters:
ssConfigPath – [in] Path to the file containing the configuration (TOML). The path can be an absolute as well as a relative path. In case a relative path is provided, the executable directory is searched as well as all directories supplied through the AddConfigSearchDir function.
- Returns:
Returns a config process result enum value.
- boolean SaveConfig (in u8string ssConfigPath) const
Save a configuration file pointed to by the provided file path. All components are saved that were added after the last baseline with the configuration specific settings.
- Attention
Configuration changes can only occur when the system is in configuration mode.
- Parameters:
ssConfigPath – [in] Path to the file containing the configuration (TOML). The path can be an absolute as well as a relative path. In case a relative path is provided, the configuration is stored relative to the executable directory.
- Returns:
Returns ‘true’ on success; ‘false’ otherwise.
- boolean AddConfigSearchDir (in u8string ssDir)
Add a search path to a folder where a config file can be found.
- Parameters:
ssDir – [in] Relative or absolute path to an existing folder.
- Returns:
Returns ‘true’ on success; ‘false’ otherwise.
-
void ResetConfigBaseline()
Reset the configuration baseline.
The configuration baseline determines what belongs to the current configuration. Any object being added after this baseline will be stored in a configuration file.
Public Static Attributes
-
static ::sdv::interface_id _id = 0x8A3E712D61F4105D#
Interface ID.