class ConfigVariable

Base class for all configuration variables.

Provides common interface for registration, serialization, and metadata access.

Public

Constructors

ConfigVariable

ConfigVariable(const char *name, const char *description, ConfigVariableFlags flags)

Methods

~ConfigVariable

virtual ~ConfigVariable() noexcept

GetName

const char *GetName() const

Returns the name of this configuration variable.

GetDescription

const char *GetDescription() const

Returns the description of this configuration variable.

GetSource

ConfigVariableSource GetSource() const

Returns the source from which the current value was set.

GetFlags

ConfigVariableFlags GetFlags() const

Returns the flags controlling this variable's behavior.

IsReadOnly

bool IsReadOnly() const

Returns true if this variable cannot be modified at runtime.

IsRenderThreadSafe

bool IsRenderThreadSafe() const

Returns true if this variable defers updates to frame boundaries.

GetValueAsString

virtual String GetValueAsString() const = 0

Returns the current value formatted as a string.

GetDefaultValueAsString

virtual String GetDefaultValueAsString() const = 0

Returns the default value formatted as a string.

GetTypeName

virtual const char *GetTypeName() const = 0

Returns the type name of this variable (e.g., "bool", "i32").

Protected

Methods

ApplyPendingUpdate

virtual void ApplyPendingUpdate() = 0

Called by ConfigVariableManager to apply any pending deferred updates.

SetFromString

virtual bool SetFromString(const String &value, ConfigVariableSource source) = 0

Sets the value from a string representation.

value
The string value to parse.
source
The source of this value (for priority handling).

Returns: True if the value was successfully set, false otherwise.

MarkInitialized

void MarkInitialized()

Marks this variable as initialized (enables ReadOnly enforcement).

Fields

mName

const char * mName

mDescription

const char * mDescription

mFlags

ConfigVariableFlags mFlags

mSource

std::atomic<ConfigVariableSource> mSource

mInitialized

bool mInitialized