Drag[en]gine Script Module DragonScript
1.23
|
Public Member Functions | |
Management | |
ServiceObjectType | getValueType () |
Value type. More... | |
bool | isBoolean () |
Is boolean value. More... | |
bool | getBoolean () |
Boolean value. More... | |
bool | isInteger () |
Is integer value. More... | |
int | getInteger () |
Integer value. More... | |
bool | isFloat () |
Is float value. More... | |
float | getFloat () |
Float value. More... | |
bool | isString () |
Is string value. More... | |
String | getString () |
String value. More... | |
bool | isResource () |
Is resource value. More... | |
Object | getResource () |
Resource value. More... | |
bool | isData () |
Is data value. More... | |
MemoryFile | getData () |
Data value. More... | |
bool | isList () |
Is list value. More... | |
bool | isDictionary () |
Is dictionary value. More... | |
int | getChildCount () |
Count of child objects. More... | |
Array | getChildrenKeys () |
List of all children keys. More... | |
ServiceObject | getChildAt (int index) |
Child object at index. More... | |
ServiceObject | getChildAt (String key) |
Child object with key or nullptr if absent. More... | |
void | addChild (ServiceObject value) |
Add child object. More... | |
void | setChildAt (String key, ServiceObject value) |
Set child object with key overwriting existing child if present. More... | |
void | addBoolChild (bool value) |
Add boolean child object. More... | |
void | setBoolChildAt (String key, bool value) |
Set boolean child with key overwriting existing child if present. More... | |
void | addIntChild (int value) |
Add integer child object. More... | |
void | setIntChildAt (String key, int value) |
Set integer child with key overwriting existing child if present. More... | |
void | addFloatChild (float value) |
Add float child object. More... | |
void | setFloatChildAt (String key, float value) |
Set float child with key overwriting existing child if present. More... | |
void | addStringChild (String value) |
Add string child object. More... | |
void | setStringChildAt (String key, String value) |
Set string child with key overwriting existing child if present. More... | |
void | addResourceChild (Object value) |
Add resource child object. More... | |
void | setResourceChildAt (String key, Object value) |
Set resource child with key overwriting existing child if present. More... | |
void | addDataChild (MemoryFile value) |
Add data child object. More... | |
void | setDataChildAt (String key, MemoryFile value) |
Set data child with key overwriting existing child if present. More... | |
void | removeChild (int index) |
Remove child at index. More... | |
void | removeChild (String key) |
Remove child object with key if present. More... | |
void | removeAllChildren () |
Remove all child objects. More... | |
bool | equals (Object other) |
Service objects are equal. More... | |
Constructors | |
ServiceObject | new () |
Create service object of type ServiceObjectType::dictionary. More... | |
ServiceObject | new (ServiceObject copy, bool deep) |
Create copy of service object. More... | |
static ServiceObject | newBool (bool value) |
Create service object of type ServiceObjectType::boolean with value. More... | |
static ServiceObject | newInt (int value) |
Create service object of type ServiceObjectType::integer with value. More... | |
static ServiceObject | newFloat (float value) |
Create service object of type ServiceObjectType::floating with value. More... | |
static ServiceObject | newString (String value) |
Create service object of type ServiceObjectType::string with value. More... | |
static ServiceObject | newResource (Object value) |
Create service object of type ServiceObjectType::resource with value. More... | |
static ServiceObject | newData (MemoryFile value) |
Create service object of type ServiceObjectType::data with value. More... | |
static ServiceObject | newList () |
Create service object of type ServiceObjectType::list with value. More... | |
Service object.
Stores data object for use with platform services. Object value can be a boolean, an integer, a float, a string, a resource, data or a dictionary of objects. A list of objects is represented as a dictionary with the string index as key.
This is a native class.
void Dragengine.ServiceObject.addBoolChild | ( | bool | value | ) |
Add boolean child object.
EInvalidParam | Value type is not ServiceObjectType::list. |
void Dragengine.ServiceObject.addChild | ( | ServiceObject | value | ) |
Add child object.
EInvalidParam | Value type is not ServiceObjectType::list. |
void Dragengine.ServiceObject.addDataChild | ( | MemoryFile | value | ) |
Add data child object.
EInvalidParam | Value type is not ServiceObjectType::list. |
void Dragengine.ServiceObject.addFloatChild | ( | float | value | ) |
Add float child object.
EInvalidParam | Value type is not ServiceObjectType::list. |
void Dragengine.ServiceObject.addIntChild | ( | int | value | ) |
Add integer child object.
EInvalidParam | Value type is not ServiceObjectType::list. |
void Dragengine.ServiceObject.addResourceChild | ( | Object | value | ) |
Add resource child object.
EInvalidParam | Value type is not ServiceObjectType::list. |
void Dragengine.ServiceObject.addStringChild | ( | String | value | ) |
Add string child object.
EInvalidParam | Value type is not ServiceObjectType::list. |
bool Dragengine.ServiceObject.equals | ( | Object | other | ) |
Service objects are equal.
Implements Object::equals(Object).
bool Dragengine.ServiceObject.getBoolean | ( | ) |
Boolean value.
EInvalidParam | Value type is not ServiceObjectType::boolean. |
ServiceObject Dragengine.ServiceObject.getChildAt | ( | int | index | ) |
Child object at index.
EInvalidParam | Value type is not ServiceObjectType::list. |
ServiceObject Dragengine.ServiceObject.getChildAt | ( | String | key | ) |
Child object with key or nullptr if absent.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
int Dragengine.ServiceObject.getChildCount | ( | ) |
Count of child objects.
EInvalidParam | Value type is not ServiceObjectType::list nor ServiceObjectType::dictionary. |
Array Dragengine.ServiceObject.getChildrenKeys | ( | ) |
List of all children keys.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
MemoryFile Dragengine.ServiceObject.getData | ( | ) |
Data value.
EInvalidParam | Value type is not ServiceObjectType::data. |
float Dragengine.ServiceObject.getFloat | ( | ) |
Float value.
EInvalidParam | Value type is not ServiceObjectType::floating. |
int Dragengine.ServiceObject.getInteger | ( | ) |
Integer value.
EInvalidParam | Value type is not ServiceObjectType::integer. |
Object Dragengine.ServiceObject.getResource | ( | ) |
Resource value.
EInvalidParam | Value type is not ServiceObjectType::resource. |
String Dragengine.ServiceObject.getString | ( | ) |
String value.
EInvalidParam | Value type is not ServiceObjectType::string. |
ServiceObjectType Dragengine.ServiceObject.getValueType | ( | ) |
Value type.
bool Dragengine.ServiceObject.isBoolean | ( | ) |
Is boolean value.
bool Dragengine.ServiceObject.isData | ( | ) |
Is data value.
bool Dragengine.ServiceObject.isDictionary | ( | ) |
Is dictionary value.
bool Dragengine.ServiceObject.isFloat | ( | ) |
Is float value.
bool Dragengine.ServiceObject.isInteger | ( | ) |
Is integer value.
bool Dragengine.ServiceObject.isList | ( | ) |
Is list value.
bool Dragengine.ServiceObject.isResource | ( | ) |
Is resource value.
bool Dragengine.ServiceObject.isString | ( | ) |
Is string value.
ServiceObject Dragengine.ServiceObject.new | ( | ) |
Create service object of type ServiceObjectType::dictionary.
ServiceObject Dragengine.ServiceObject.new | ( | ServiceObject | copy, |
bool | deep | ||
) |
Create copy of service object.
|
static |
Create service object of type ServiceObjectType::boolean with value.
|
static |
Create service object of type ServiceObjectType::data with value.
|
static |
Create service object of type ServiceObjectType::floating with value.
|
static |
Create service object of type ServiceObjectType::integer with value.
|
static |
Create service object of type ServiceObjectType::list with value.
|
static |
Create service object of type ServiceObjectType::resource with value.
|
static |
Create service object of type ServiceObjectType::string with value.
void Dragengine.ServiceObject.removeAllChildren | ( | ) |
Remove all child objects.
EInvalidParam | Value type is not ServiceObjectType::list or ServiceObjectType::dictionary. |
void Dragengine.ServiceObject.removeChild | ( | int | index | ) |
Remove child at index.
EInvalidParam | Value type is not ServiceObjectType::list. |
void Dragengine.ServiceObject.removeChild | ( | String | key | ) |
Remove child object with key if present.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
void Dragengine.ServiceObject.setBoolChildAt | ( | String | key, |
bool | value | ||
) |
Set boolean child with key overwriting existing child if present.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
void Dragengine.ServiceObject.setChildAt | ( | String | key, |
ServiceObject | value | ||
) |
Set child object with key overwriting existing child if present.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
void Dragengine.ServiceObject.setDataChildAt | ( | String | key, |
MemoryFile | value | ||
) |
Set data child with key overwriting existing child if present.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
void Dragengine.ServiceObject.setFloatChildAt | ( | String | key, |
float | value | ||
) |
Set float child with key overwriting existing child if present.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
void Dragengine.ServiceObject.setIntChildAt | ( | String | key, |
int | value | ||
) |
Set integer child with key overwriting existing child if present.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
void Dragengine.ServiceObject.setResourceChildAt | ( | String | key, |
Object | value | ||
) |
Set resource child with key overwriting existing child if present.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |
void Dragengine.ServiceObject.setStringChildAt | ( | String | key, |
String | value | ||
) |
Set string child with key overwriting existing child if present.
EInvalidParam | Value type is not ServiceObjectType::dictionary. |