class
ConfigVariableManager
Manages all configuration variables in the engine.
Handles loading from config files, applying command-line overrides, and coordinating deferred updates for render-thread-safe variables.
Public
Constructors
ConfigVariableManager
Methods
~ConfigVariableManager
FindVariable
Finds a configuration variable by name.
- name
- The name of the variable to find.
Returns: Pointer to the variable, or nullptr if not found.
GetAllVariables
Returns a map of all registered configuration variables.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Internal
Methods
RegisterVariable
Registers a configuration variable with the manager.
UnregisterVariable
Unregisters a configuration variable from the manager.
LoadFromFile
Loads configuration values from an INI file.
- path
- Path to the INI file.
Returns: True if the file was loaded successfully, false otherwise.
ApplyCommandLineOverrides
Applies command-line parameter overrides to matching configuration variables.
Command-line values have higher priority than config file values.
FinalizeInitialization
Marks all variables as initialized, enabling ReadOnly enforcement.
Should be called after config file and command-line processing is complete.
ApplyPendingUpdates
Applies any pending deferred updates for RenderThreadSafe variables.
Should be called at frame boundaries when the render thread is idle.
PrintHelp
Prints information about all registered configuration variables to stdout.
Protected
Methods
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
~Module<T>
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.
Private
Methods
ParseIniLine
Parses a single line from an INI file.
- line
- The line to parse (as StringView into the file content).
- lineNumber
- Line number for error reporting.
- filePath
- File path for error reporting.
staticNormalizeName
Normalizes a variable name for case-insensitive lookup.
Converts the name to lowercase.
StorePendingValue
Stores a pending value for a variable that hasn't been registered yet.
If a value already exists, it's only overwritten if the new source has higher priority.
ApplyPendingValueIfExists
Applies any pending value for the given variable, if one exists.
Removes the pending value after applying.