Isle
Loading...
Searching...
No Matches
MxVariable Class Reference

[AI] Represents a key-value variable as used in the variable table for the LEGO Island engine. More...

#include <mxvariable.h>

Inheritance diagram for MxVariable:
Collaboration diagram for MxVariable:

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 MxStringGetValue ()
 [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 MxStringGetKey () 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...
 

Detailed Description

[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.

Constructor & Destructor Documentation

◆ MxVariable() [1/3]

MxVariable::MxVariable ( )
inline

[AI] Constructs an empty variable with no key or value.

[AI]

Definition at line 21 of file mxvariable.h.

◆ MxVariable() [2/3]

MxVariable::MxVariable ( const char *  p_key,
const char *  p_value 
)
inline

[AI] Constructs a variable with the specified key and value.

The key is uppercased. [AI]

Parameters
p_keyThe variable name or key. [AI]
p_valueThe 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.

◆ MxVariable() [3/3]

MxVariable::MxVariable ( const char *  p_key)
inline

[AI] Constructs a variable with the specified key and no value.

The key is uppercased. [AI]

Parameters
p_keyThe 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.

Member Function Documentation

◆ Destroy()

virtual void MxVariable::Destroy ( )
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.

◆ GetKey()

const MxString * MxVariable::GetKey ( ) const
inline

[AI] Provides read-only access to the variable's key/name.

[AI]

Returns
Pointer to the key string. [AI]

Definition at line 71 of file mxvariable.h.

◆ GetValue()

virtual MxString * MxVariable::GetValue ( )
inlinevirtual

[AI] Retrieves a pointer to the variable's value.

[AI]

Returns
Pointer to the value string. [AI]

[AI] Returns a pointer so that value manipulation can occur directly. [AI]

Definition at line 52 of file mxvariable.h.

◆ SetValue()

virtual void MxVariable::SetValue ( const char *  p_value)
inlinevirtual

[AI] Sets the variable's value.

[AI]

Parameters
p_valueNew 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.

Member Data Documentation

◆ m_key

MxString MxVariable::m_key
protected

[AI] The variable's key (name), always stored in uppercase.

[AI]

Definition at line 77 of file mxvariable.h.

◆ m_value

MxString MxVariable::m_value
protected

[AI] The variable's value.

[AI]

Definition at line 82 of file mxvariable.h.


The documentation for this class was generated from the following file: