Drag[en]gine Script Module DragonScript
1.21
|
Entry in a ParameterTable. More...
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... | |
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.
void Dragengine.ParameterTableEntry.clearValue | ( | ) |
Clear value setting it to null.
String Dragengine.ParameterTableEntry.getName | ( | ) |
Name.
Object Dragengine.ParameterTableEntry.getValue | ( | ) |
Value.
Can be of type bool, int, float, String, Persistable or null if not set.
bool Dragengine.ParameterTableEntry.getValue | ( | bool | defaultValue | ) |
Boolean value or default value if parameter is not set.
float Dragengine.ParameterTableEntry.getValue | ( | float | defaultValue | ) |
FLoating point value or default value if parameter is not set.
int Dragengine.ParameterTableEntry.getValue | ( | int | defaultValue | ) |
Integer value or default value if parameter is not set.
Persistable Dragengine.ParameterTableEntry.getValue | ( | Persistable | defaultValue | ) |
Persistable value or default value if parameter is not set.
String Dragengine.ParameterTableEntry.getValue | ( | String | defaultValue | ) |
String value or default value if parameter is not set.
bool Dragengine.ParameterTableEntry.isNotNull | ( | ) |
Value is not null.
bool Dragengine.ParameterTableEntry.isNull | ( | ) |
Value is null.
ParameterTableEntry Dragengine.ParameterTableEntry.new | ( | String | name | ) |
Create parameter table entry.
|
static |
Read parameter table entry from file.
void Dragengine.ParameterTableEntry.setValue | ( | bool | value | ) |
Set value or null if not set.
void Dragengine.ParameterTableEntry.setValue | ( | float | value | ) |
Set value or null if not set.
void Dragengine.ParameterTableEntry.setValue | ( | int | value | ) |
Set value or null if not set.
void Dragengine.ParameterTableEntry.setValue | ( | Persistable | value | ) |
Set value or null if not set.
void Dragengine.ParameterTableEntry.setValue | ( | String | value | ) |
Set value or null if not set.
void Dragengine.ParameterTableEntry.writeToFile | ( | PersistencyEnvironment | env, |
FileWriter | writer | ||
) |
Write parameter table entry target to file.
String Dragengine.ParameterTableEntry.pName |
Parameter name.
Object Dragengine.ParameterTableEntry.pValue |
Value or null if not set.