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

Entry in a ParameterTable. More...

Inheritance diagram for Dragengine.ParameterTableEntry:

Public Member Functions

void clearValue ()
 Clear value setting it to null. More...
 
String getName ()
 Name. More...
 
Object getValue ()
 Value. More...
 
bool getValue (bool defaultValue)
 Boolean value or default value if parameter is not set. More...
 
float getValue (float defaultValue)
 FLoating point value or default value if parameter is not set. More...
 
int getValue (int defaultValue)
 Integer value or default value if parameter is not set. More...
 
Persistable getValue (Persistable defaultValue)
 Persistable value or default value if parameter is not set. More...
 
String getValue (String defaultValue)
 String value or default value if parameter is not set. More...
 
bool isNotNull ()
 Value is not null. More...
 
bool isNull ()
 Value is null. More...
 
ParameterTableEntry new (String name)
 Create parameter table entry. More...
 
void setValue (bool value)
 Set value or null if not set. More...
 
void setValue (float value)
 Set value or null if not set. More...
 
void setValue (int value)
 Set value or null if not set. More...
 
void setValue (Persistable value)
 Set value or null if not set. More...
 
void setValue (String value)
 Set value or null if not set. More...
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write parameter table entry target to file. More...
 

Static Public Member Functions

static ParameterTableEntry readFromFile (PersistencyEnvironment env, FileReader reader)
 Read parameter table entry from file. More...
 

Public Attributes

String pName
 Parameter name. More...
 
Object pValue
 Value or null if not set. More...
 

Detailed Description

Entry in a ParameterTable.

Values can be primitive values and objects implementing the Persistable interface. Primitive values are converted as best between the stored value and the requested value. Hence storing an integer value it can be retrieved later on as floating point value or even a String value. If you store a floating point value and retrieve it later on as integer value precision will be lost. If you store a string value and retrieve it later on as boolean value the values "1", "true" and "yes" will be converted to true with all other string values converted to false.

Values are cleared by setting them to null.

Member Function Documentation

◆ clearValue()

void Dragengine.ParameterTableEntry.clearValue ( )

Clear value setting it to null.

◆ getName()

String Dragengine.ParameterTableEntry.getName ( )

Name.

◆ getValue() [1/6]

Object Dragengine.ParameterTableEntry.getValue ( )

Value.

Version
1.21

Can be of type bool, int, float, String, Persistable or null if not set.

◆ getValue() [2/6]

bool Dragengine.ParameterTableEntry.getValue ( bool  defaultValue)

Boolean value or default value if parameter is not set.

◆ getValue() [3/6]

float Dragengine.ParameterTableEntry.getValue ( float  defaultValue)

FLoating point value or default value if parameter is not set.

◆ getValue() [4/6]

int Dragengine.ParameterTableEntry.getValue ( int  defaultValue)

Integer value or default value if parameter is not set.

◆ getValue() [5/6]

Persistable Dragengine.ParameterTableEntry.getValue ( Persistable  defaultValue)

Persistable value or default value if parameter is not set.

◆ getValue() [6/6]

String Dragengine.ParameterTableEntry.getValue ( String  defaultValue)

String value or default value if parameter is not set.

◆ isNotNull()

bool Dragengine.ParameterTableEntry.isNotNull ( )

Value is not null.

◆ isNull()

bool Dragengine.ParameterTableEntry.isNull ( )

Value is null.

◆ new()

ParameterTableEntry Dragengine.ParameterTableEntry.new ( String  name)

Create parameter table entry.

◆ readFromFile()

static ParameterTableEntry Dragengine.ParameterTableEntry.readFromFile ( PersistencyEnvironment  env,
FileReader  reader 
)
static

Read parameter table entry from file.

◆ setValue() [1/5]

void Dragengine.ParameterTableEntry.setValue ( bool  value)

Set value or null if not set.

◆ setValue() [2/5]

void Dragengine.ParameterTableEntry.setValue ( float  value)

Set value or null if not set.

◆ setValue() [3/5]

void Dragengine.ParameterTableEntry.setValue ( int  value)

Set value or null if not set.

◆ setValue() [4/5]

void Dragengine.ParameterTableEntry.setValue ( Persistable  value)

Set value or null if not set.

◆ setValue() [5/5]

void Dragengine.ParameterTableEntry.setValue ( String  value)

Set value or null if not set.

◆ writeToFile()

void Dragengine.ParameterTableEntry.writeToFile ( PersistencyEnvironment  env,
FileWriter  writer 
)

Write parameter table entry target to file.

Member Data Documentation

◆ pName

String Dragengine.ParameterTableEntry.pName

Parameter name.

◆ pValue

Object Dragengine.ParameterTableEntry.pValue

Value or null if not set.


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