Isle
|
[AI] Represents a key-value variable as used in the variable table for the LEGO Island engine. More...
#include <mxvariable.h>
Public Member Functions | |
MxVariable () | |
[AI] Constructs an empty variable with no key or value. More... | |
MxVariable (const char *p_key, const char *p_value) | |
[AI] Constructs a variable with the specified key and value. More... | |
MxVariable (const char *p_key) | |
[AI] Constructs a variable with the specified key and no value. More... | |
virtual MxString * | GetValue () |
[AI] Retrieves a pointer to the variable's value. More... | |
virtual void | SetValue (const char *p_value) |
[AI] Sets the variable's value. More... | |
virtual void | Destroy () |
[AI] Destroys the variable, deleting the object. More... | |
const MxString * | GetKey () const |
[AI] Provides read-only access to the variable's key/name. More... | |
Protected Attributes | |
MxString | m_key |
[AI] The variable's key (name), always stored in uppercase. More... | |
MxString | m_value |
[AI] The variable's value. More... | |
[AI] Represents a key-value variable as used in the variable table for the LEGO Island engine.
Keys are always stored in uppercase to ease case-insensitive lookups. [AI]
[AI] This class encapsulates a variable with a string key and string value. It is used as the primary storage element for the game's variable table system (see MxVariableTable), with utility methods for setting and getting the variable's value. Keys are always uppercased when set to ensure consistency throughout the engine. [AI]
Definition at line 16 of file mxvariable.h.
|
inline |
[AI] Constructs an empty variable with no key or value.
[AI]
Definition at line 21 of file mxvariable.h.
|
inline |
[AI] Constructs a variable with the specified key and value.
The key is uppercased. [AI]
p_key | The variable name or key. [AI] |
p_value | The variable value. [AI] |
[AI] The variable name is converted to uppercase to support case-insensitive storage and lookup. [AI]
Definition at line 29 of file mxvariable.h.
|
inline |
[AI] Constructs a variable with the specified key and no value.
The key is uppercased. [AI]
p_key | The variable name or key. [AI] |
[AI] The variable name is converted to uppercase. The value will be empty. [AI]
Definition at line 41 of file mxvariable.h.
|
inlinevirtual |
[AI] Destroys the variable, deleting the object.
[AI]
[AI] Used to delete the dynamically allocated MxVariable. [AI]
Definition at line 65 of file mxvariable.h.
|
inline |
[AI] Provides read-only access to the variable's key/name.
[AI]
Definition at line 71 of file mxvariable.h.
|
inlinevirtual |
[AI] Retrieves a pointer to the variable's value.
[AI]
[AI] Returns a pointer so that value manipulation can occur directly. [AI]
Definition at line 52 of file mxvariable.h.
|
inlinevirtual |
[AI] Sets the variable's value.
[AI]
p_value | New value to assign. [AI] |
[AI] The value is replaced, not appended. [AI]
Reimplemented in LegoBackgroundColor, LegoFullScreenMovie, CustomizeAnimFileVariable, VisibilityVariable, CameraLocationVariable, CursorVariable, and WhoAmIVariable.
Definition at line 59 of file mxvariable.h.
|
protected |
[AI] The variable's key (name), always stored in uppercase.
[AI]
Definition at line 77 of file mxvariable.h.
|
protected |