━ Methods
━ vm::registerBool()
@Objective: Assigns provided bool
value to the object
's (located at topmost index of the stack) specified index.
ℹ️ (topmost value, i.e value at stack index -1)[index] = value
void result = vm -> registerBool(std::string index, bool value);
void result = vm -> registerBool(std::string index, bool value, std::string parent);
━ vm::registerString()
@Objective: Assigns provided string
value to the object
's (located at topmost index of the stack) specified index.
ℹ️ (topmost value, i.e value at stack index -1)[index] = value
void result = vm -> registerString(std::string index, std::string& value);
void result = vm -> registerString(std::string index, std::string& value, std::string parent);
━ vm::registerNumber()
@Objective: Assigns provided number
value to the object
's (located at topmost index of the stack) specified index.
ℹ️ (topmost value, i.e value at stack index -1)[index] = value
void result = vm -> registerNumber(std::string index, int value);
void result = vm -> registerNumber(std::string index, int value, std::string parent);
void result = vm -> registerNumber(std::string index, float value);
void result = vm -> registerNumber(std::string index, float value, std::string parent);
void result = vm -> registerNumber(std::string index, double value);
void result = vm -> registerNumber(std::string index, double value, std::string parent);
━ vm::registerFunction()
@Objective: Assigns provided function
to the object
's (located at topmost index of the stack) specified index.
ℹ️ (topmost value, i.e value at stack index -1)[index] = exec
void result = vm -> registerFunction(std::string index, vital_exec& exec);
ℹ️ Unlike the above, it registers to the global parent (object
). Useful for namespacing your functions.
void result = vm -> registerFunction(std::string index, vital_exec& exec, std::string parent);