Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.ServiceObject Class Reference

Service object. More...

Inheritance diagram for Dragengine.ServiceObject:

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.

Detailed Description

Service object.

Version
1.23

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.

Member Function Documentation

◆ addBoolChild()

void Dragengine.ServiceObject.addBoolChild ( bool value)

Add boolean child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

References isDictionary().

Referenced by setResourceChildAt().

◆ addChild()

void Dragengine.ServiceObject.addChild ( ServiceObject value)

Add child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

References getData().

Referenced by setStringChildAt().

◆ addDataChild()

void Dragengine.ServiceObject.addDataChild ( MemoryFile value)

Add data child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

References setBoolChildAt().

Referenced by equals().

◆ addFloatChild()

void Dragengine.ServiceObject.addFloatChild ( float value)

Add float child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

References getChildAt().

Referenced by removeAllChildren().

◆ addIntChild()

void Dragengine.ServiceObject.addIntChild ( int value)

Add integer child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

Referenced by setDataChildAt().

◆ addResourceChild()

void Dragengine.ServiceObject.addResourceChild ( Object value)

Add resource child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

References setChildAt().

Referenced by equals().

◆ addStringChild()

void Dragengine.ServiceObject.addStringChild ( String value)

Add string child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

Referenced by equals().

◆ equals()

bool Dragengine.ServiceObject.equals ( Object other)

Service objects are equal.

Implements Object#equals(Object).

Returns
true if other is of type ServiceObject and both contents are equal.

References addDataChild(), addResourceChild(), addStringChild(), equals(), removeAllChildren(), removeChild(), setDataChildAt(), setResourceChildAt(), and setStringChildAt().

Referenced by equals().

◆ getBoolean()

bool Dragengine.ServiceObject.getBoolean ( )

Boolean value.

Exceptions
EInvalidParamValue type is not ServiceObjectType#boolean.

Referenced by isFloat().

◆ getChildAt() [1/2]

ServiceObject Dragengine.ServiceObject.getChildAt ( int index)

Child object at index.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

Referenced by addFloatChild(), and setFloatChildAt().

◆ getChildAt() [2/2]

ServiceObject Dragengine.ServiceObject.getChildAt ( String key)

Child object with key or nullptr if absent.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References isData().

◆ getChildCount()

int Dragengine.ServiceObject.getChildCount ( )

Count of child objects.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list nor ServiceObjectType#dictionary.

References isResource().

Referenced by setBoolChildAt().

◆ getChildrenKeys()

Array Dragengine.ServiceObject.getChildrenKeys ( )

List of all children keys.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References getResource().

Referenced by setIntChildAt().

◆ getData()

MemoryFile Dragengine.ServiceObject.getData ( )

Data value.

Exceptions
EInvalidParamValue type is not ServiceObjectType#data.

References isString().

Referenced by addChild().

◆ getFloat()

float Dragengine.ServiceObject.getFloat ( )

Float value.

Exceptions
EInvalidParamValue type is not ServiceObjectType#floating.

Referenced by isData().

◆ getInteger()

int Dragengine.ServiceObject.getInteger ( )

Integer value.

Exceptions
EInvalidParamValue type is not ServiceObjectType#integer.

References isBoolean().

Referenced by getString().

◆ getResource()

Object Dragengine.ServiceObject.getResource ( )

Resource value.

Exceptions
EInvalidParamValue type is not ServiceObjectType#resource.

Referenced by getChildrenKeys().

◆ getString()

String Dragengine.ServiceObject.getString ( )

String value.

Exceptions
EInvalidParamValue type is not ServiceObjectType#string.

References getInteger().

Referenced by isDictionary().

◆ getValueType()

ServiceObjectType Dragengine.ServiceObject.getValueType ( )

Value type.

References newList().

Referenced by isInteger().

◆ isBoolean()

bool Dragengine.ServiceObject.isBoolean ( )

Is boolean value.

References new().

Referenced by getInteger().

◆ isData()

bool Dragengine.ServiceObject.isData ( )

Is data value.

References getFloat().

Referenced by getChildAt().

◆ isDictionary()

bool Dragengine.ServiceObject.isDictionary ( )

Is dictionary value.

References getString().

Referenced by addBoolChild().

◆ isFloat()

bool Dragengine.ServiceObject.isFloat ( )

Is float value.

References getBoolean().

Referenced by isResource().

◆ isInteger()

bool Dragengine.ServiceObject.isInteger ( )

Is integer value.

References getValueType().

Referenced by isString().

◆ isList()

bool Dragengine.ServiceObject.isList ( )

Is list value.

Referenced by setChildAt().

◆ isResource()

bool Dragengine.ServiceObject.isResource ( )

Is resource value.

References isFloat().

Referenced by getChildCount().

◆ isString()

bool Dragengine.ServiceObject.isString ( )

Is string value.

References isInteger().

Referenced by getData().

◆ new() [1/2]

ServiceObject Dragengine.ServiceObject.new ( )

Create service object of type ServiceObjectType#dictionary.

References new().

Referenced by isBoolean(), and new().

◆ new() [2/2]

ServiceObject Dragengine.ServiceObject.new ( ServiceObject copy,
bool deep )

Create copy of service object.

References newData(), and newResource().

◆ newBool()

ServiceObject Dragengine.ServiceObject.newBool ( bool value)
static

Create service object of type ServiceObjectType#boolean with value.

References newBool().

Referenced by newBool().

◆ newData()

ServiceObject Dragengine.ServiceObject.newData ( MemoryFile value)
static

Create service object of type ServiceObjectType#data with value.

References newString().

Referenced by new().

◆ newFloat()

ServiceObject Dragengine.ServiceObject.newFloat ( float value)
static

Create service object of type ServiceObjectType#floating with value.

References newInt().

Referenced by newString().

◆ newInt()

ServiceObject Dragengine.ServiceObject.newInt ( int value)
static

Create service object of type ServiceObjectType#integer with value.

Referenced by newFloat().

◆ newList()

ServiceObject Dragengine.ServiceObject.newList ( )
static

Create service object of type ServiceObjectType#list with value.

Referenced by getValueType().

◆ newResource()

ServiceObject Dragengine.ServiceObject.newResource ( Object value)
static

Create service object of type ServiceObjectType#resource with value.

Referenced by new().

◆ newString()

ServiceObject Dragengine.ServiceObject.newString ( String value)
static

Create service object of type ServiceObjectType#string with value.

References newFloat().

Referenced by newData().

◆ removeAllChildren()

void Dragengine.ServiceObject.removeAllChildren ( )

Remove all child objects.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list or ServiceObjectType#dictionary.

References addFloatChild(), and setFloatChildAt().

Referenced by equals().

◆ removeChild() [1/2]

void Dragengine.ServiceObject.removeChild ( int index)

Remove child at index.

Exceptions
EInvalidParamValue type is not ServiceObjectType#list.

References setIntChildAt().

Referenced by equals().

◆ removeChild() [2/2]

void Dragengine.ServiceObject.removeChild ( String key)

Remove child object with key if present.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

◆ setBoolChildAt()

void Dragengine.ServiceObject.setBoolChildAt ( String key,
bool value )

Set boolean child with key overwriting existing child if present.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References getChildCount().

Referenced by addDataChild().

◆ setChildAt()

void Dragengine.ServiceObject.setChildAt ( String key,
ServiceObject value )

Set child object with key overwriting existing child if present.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References isList().

Referenced by addResourceChild().

◆ setDataChildAt()

void Dragengine.ServiceObject.setDataChildAt ( String key,
MemoryFile value )

Set data child with key overwriting existing child if present.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References addIntChild().

Referenced by equals().

◆ setFloatChildAt()

void Dragengine.ServiceObject.setFloatChildAt ( String key,
float value )

Set float child with key overwriting existing child if present.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References getChildAt().

Referenced by removeAllChildren().

◆ setIntChildAt()

void Dragengine.ServiceObject.setIntChildAt ( String key,
int value )

Set integer child with key overwriting existing child if present.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References getChildrenKeys().

Referenced by removeChild().

◆ setResourceChildAt()

void Dragengine.ServiceObject.setResourceChildAt ( String key,
Object value )

Set resource child with key overwriting existing child if present.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References addBoolChild().

Referenced by equals().

◆ setStringChildAt()

void Dragengine.ServiceObject.setStringChildAt ( String key,
String value )

Set string child with key overwriting existing child if present.

Exceptions
EInvalidParamValue type is not ServiceObjectType#dictionary.

References addChild().

Referenced by equals().


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