|
Drag[en]gine Script Module DragonScript 1.32.1
|
Service object. More...
Public Member Functions | |
Management | |
| ServiceObjectType | getValueType () |
| Value type. | |
| bool | isBoolean () |
| Is boolean value. | |
| bool | getBoolean () |
| Boolean value. | |
| bool | isInteger () |
| Is integer value. | |
| int | getInteger () |
| Integer value. | |
| bool | isFloat () |
| Is float value. | |
| float | getFloat () |
| Float value. | |
| bool | isString () |
| Is string value. | |
| String | getString () |
| String value. | |
| bool | isResource () |
| Is resource value. | |
| Object | getResource () |
| Resource value. | |
| bool | isData () |
| Is data value. | |
| MemoryFile | getData () |
| Data value. | |
| bool | isList () |
| Is list value. | |
| bool | isDictionary () |
| Is dictionary value. | |
| int | getChildCount () |
| Count of child objects. | |
| Array | getChildrenKeys () |
| List of all children keys. | |
| ServiceObject | getChildAt (int index) |
| Child object at index. | |
| ServiceObject | getChildAt (String key) |
| Child object with key or nullptr if absent. | |
| void | addChild (ServiceObject value) |
| Add child object. | |
| void | setChildAt (String key, ServiceObject value) |
| Set child object with key overwriting existing child if present. | |
| void | addBoolChild (bool value) |
| Add boolean child object. | |
| void | setBoolChildAt (String key, bool value) |
| Set boolean child with key overwriting existing child if present. | |
| void | addIntChild (int value) |
| Add integer child object. | |
| void | setIntChildAt (String key, int value) |
| Set integer child with key overwriting existing child if present. | |
| void | addFloatChild (float value) |
| Add float child object. | |
| void | setFloatChildAt (String key, float value) |
| Set float child with key overwriting existing child if present. | |
| void | addStringChild (String value) |
| Add string child object. | |
| void | setStringChildAt (String key, String value) |
| Set string child with key overwriting existing child if present. | |
| void | addResourceChild (Object value) |
| Add resource child object. | |
| void | setResourceChildAt (String key, Object value) |
| Set resource child with key overwriting existing child if present. | |
| void | addDataChild (MemoryFile value) |
| Add data child object. | |
| void | setDataChildAt (String key, MemoryFile value) |
| Set data child with key overwriting existing child if present. | |
| void | removeChild (int index) |
| Remove child at index. | |
| void | removeChild (String key) |
| Remove child object with key if present. | |
| void | removeAllChildren () |
| Remove all child objects. | |
| bool | equals (Object other) |
| Service objects are equal. | |
Constructors | |
| ServiceObject | new () |
| Create service object of type ServiceObjectType::dictionary. | |
| ServiceObject | new (ServiceObject copy, bool deep) |
| Create copy of service object. | |
| static ServiceObject | newBool (bool value) |
| Create service object of type ServiceObjectType::boolean with value. | |
| static ServiceObject | newInt (int value) |
| Create service object of type ServiceObjectType::integer with value. | |
| static ServiceObject | newFloat (float value) |
| Create service object of type ServiceObjectType::floating with value. | |
| static ServiceObject | newString (String value) |
| Create service object of type ServiceObjectType::string with value. | |
| static ServiceObject | newResource (Object value) |
| Create service object of type ServiceObjectType::resource with value. | |
| static ServiceObject | newData (MemoryFile value) |
| Create service object of type ServiceObjectType::data with value. | |
| static ServiceObject | newList () |
| Create service object of type ServiceObjectType::list with value. | |
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. |