LEOPropertyInstructionsGeneric

Includes:
"LEOPropertyInstructions.h"
<stdio.h>

Introduction

Instructions to implement property syntax for values only.



Functions

LEOHasPropertyInstruction
LEOPushMeInstruction
LEOPushPropertyOfObjectInstruction
LEOSetPropertyOfObjectInstruction

LEOHasPropertyInstruction


Discussion

This instruction pushes a boolean that indicates whether the given object has the given property.

(HAS_PROPERTY_INSTR)


LEOPushMeInstruction


void LEOPushMeInstruction(
    LEOContext *inContext ) 
Discussion

This instruction pushes a reference to the object owning the current script onto the stack. It implements the 'me' object specifier for Hammer.

(PUSH_ME_INSTR)


LEOPushPropertyOfObjectInstruction


Discussion

Push the value of a property of an object onto the stack, ready for use e.g. in an expression. Two parameters need to be pushed on the stack before calling this and will be popped off the stack by this instruction before the property value is pushed:

propertyName - The name of the property to retrieve, as a string or some value that converts to a string.

object - The object from which to retrieve the property, as a WILDObjectValue (i.e. isa = kLeoValueTypeWILDObject or isa = kLeoValueTypeObjectDescriptor).

(PUSH_PROPERTY_OF_OBJECT_INSTR)


LEOSetPropertyOfObjectInstruction


Discussion

Change the value of a particular property of an object. Three parameters must have been pushed on the stack before this instruction is called, and will be popped off the stack:

propertyName - An array containing names of the properties to change, as an array of string values or values that convert to a string. If more than one item is passed, the code will descend into the object and set the keys in the array.

object - The object to change the property on. This must be a WILDObjectValue (i.e. isa = kLeoValueTypeWILDObject or isa = kLeoValueTypeObjectDescriptor).

value - The new value to assign to the given property.

(SET_PROPERTY_OF_OBJECT_INSTR)