Drag[en]gine Script Module DragonScript  1.23
Dragengine.ServiceObject Class Reference

Service object. More...

Inheritance diagram for Dragengine.ServiceObject:

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...
 

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.

◆ addChild()

void Dragengine.ServiceObject.addChild ( ServiceObject  value)

Add child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType::list.

◆ addDataChild()

void Dragengine.ServiceObject.addDataChild ( MemoryFile  value)

Add data child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType::list.

◆ addFloatChild()

void Dragengine.ServiceObject.addFloatChild ( float  value)

Add float child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType::list.

◆ addIntChild()

void Dragengine.ServiceObject.addIntChild ( int  value)

Add integer child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType::list.

◆ addResourceChild()

void Dragengine.ServiceObject.addResourceChild ( Object  value)

Add resource child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType::list.

◆ addStringChild()

void Dragengine.ServiceObject.addStringChild ( String  value)

Add string child object.

Exceptions
EInvalidParamValue type is not ServiceObjectType::list.

◆ 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.

◆ getBoolean()

bool Dragengine.ServiceObject.getBoolean ( )

Boolean value.

Exceptions
EInvalidParamValue type is not ServiceObjectType::boolean.

◆ getChildAt() [1/2]

ServiceObject Dragengine.ServiceObject.getChildAt ( int  index)

Child object at index.

Exceptions
EInvalidParamValue type is not ServiceObjectType::list.

◆ getChildAt() [2/2]

ServiceObject Dragengine.ServiceObject.getChildAt ( String  key)

Child object with key or nullptr if absent.

Exceptions
EInvalidParamValue type is not ServiceObjectType::dictionary.

◆ getChildCount()

int Dragengine.ServiceObject.getChildCount ( )

Count of child objects.

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

◆ getChildrenKeys()

Array Dragengine.ServiceObject.getChildrenKeys ( )

List of all children keys.

Exceptions
EInvalidParamValue type is not ServiceObjectType::dictionary.

◆ getData()

MemoryFile Dragengine.ServiceObject.getData ( )

Data value.

Exceptions
EInvalidParamValue type is not ServiceObjectType::data.

◆ getFloat()

float Dragengine.ServiceObject.getFloat ( )

Float value.

Exceptions
EInvalidParamValue type is not ServiceObjectType::floating.

◆ getInteger()

int Dragengine.ServiceObject.getInteger ( )

Integer value.

Exceptions
EInvalidParamValue type is not ServiceObjectType::integer.

◆ getResource()

Object Dragengine.ServiceObject.getResource ( )

Resource value.

Exceptions
EInvalidParamValue type is not ServiceObjectType::resource.

◆ getString()

String Dragengine.ServiceObject.getString ( )

String value.

Exceptions
EInvalidParamValue type is not ServiceObjectType::string.

◆ getValueType()

ServiceObjectType Dragengine.ServiceObject.getValueType ( )

Value type.

◆ isBoolean()

bool Dragengine.ServiceObject.isBoolean ( )

Is boolean value.

◆ isData()

bool Dragengine.ServiceObject.isData ( )

Is data value.

◆ isDictionary()

bool Dragengine.ServiceObject.isDictionary ( )

Is dictionary value.

◆ isFloat()

bool Dragengine.ServiceObject.isFloat ( )

Is float value.

◆ isInteger()

bool Dragengine.ServiceObject.isInteger ( )

Is integer value.

◆ isList()

bool Dragengine.ServiceObject.isList ( )

Is list value.

◆ isResource()

bool Dragengine.ServiceObject.isResource ( )

Is resource value.

◆ isString()

bool Dragengine.ServiceObject.isString ( )

Is string value.

◆ new() [1/2]

ServiceObject Dragengine.ServiceObject.new ( )

Create service object of type ServiceObjectType::dictionary.

◆ new() [2/2]

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

Create copy of service object.

◆ newBool()

static ServiceObject Dragengine.ServiceObject.newBool ( bool  value)
static

Create service object of type ServiceObjectType::boolean with value.

◆ newData()

static ServiceObject Dragengine.ServiceObject.newData ( MemoryFile  value)
static

Create service object of type ServiceObjectType::data with value.

◆ newFloat()

static ServiceObject Dragengine.ServiceObject.newFloat ( float  value)
static

Create service object of type ServiceObjectType::floating with value.

◆ newInt()

static ServiceObject Dragengine.ServiceObject.newInt ( int  value)
static

Create service object of type ServiceObjectType::integer with value.

◆ newList()

static ServiceObject Dragengine.ServiceObject.newList ( )
static

Create service object of type ServiceObjectType::list with value.

◆ newResource()

static ServiceObject Dragengine.ServiceObject.newResource ( Object  value)
static

Create service object of type ServiceObjectType::resource with value.

◆ newString()

static ServiceObject Dragengine.ServiceObject.newString ( String  value)
static

Create service object of type ServiceObjectType::string with value.

◆ removeAllChildren()

void Dragengine.ServiceObject.removeAllChildren ( )

Remove all child objects.

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

◆ removeChild() [1/2]

void Dragengine.ServiceObject.removeChild ( int  index)

Remove child at index.

Exceptions
EInvalidParamValue type is not ServiceObjectType::list.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

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