Drag[en]gine Script Module DragonScript
1.23
|
Mapping strings class property for use with XML loading. More...
Public Member Functions | |
void | addMapping (String key, String value) |
Add mapping replacing existing one if present. More... | |
void | forEachMapping (Block ablock) |
Visit mappings with block. More... | |
Dictionary | getMap (StubWithProperties stub, CodecPropertyString codec) |
String map modified by stub property if present. More... | |
int | getMappingCount () |
Number of mappings. More... | |
bool | hasMapping (String key) |
Mapping is present. More... | |
String | map (String key) |
Map string or null if mapping does not exist. More... | |
ECPStringMap | new (String name) |
Create property. More... | |
void | removeAllMappings () |
Remove all mappings. More... | |
void | setValue (Object value) |
Set value of property from XML decoded value. More... | |
Public Member Functions inherited from Dragengine.Scenery.ElementClassProperty | |
void | dispose () |
Dispose of element class property to break reference loops. More... | |
String | getName () |
Name. More... | |
bool | logPreloadProblems (ElementClass elementClass, Console console) |
Log preloading problems. More... | |
void | preloadResources (ElementClass elementClass, PreloadCounter counter) |
Preload resources if supported. More... | |
Mapping strings class property for use with XML loading.
void Dragengine.Scenery.ECPStringMap.addMapping | ( | String | key, |
String | value | ||
) |
Add mapping replacing existing one if present.
void Dragengine.Scenery.ECPStringMap.forEachMapping | ( | Block | ablock | ) |
Visit mappings with block.
First block parameter is String key. Second block parameter is String value.
Dictionary Dragengine.Scenery.ECPStringMap.getMap | ( | StubWithProperties | stub, |
CodecPropertyString | codec | ||
) |
String map modified by stub property if present.
If named stub property is not present or empty string the stored dictionary is returned. If the named stub property is present it is decoded using codec. Since the returned dictionary can be the stored dictionary do not modify the returned dictionary. If you need to modify it create first a copy using "Dictionary.new(getMap(stub, codec))".
int Dragengine.Scenery.ECPStringMap.getMappingCount | ( | ) |
Number of mappings.
bool Dragengine.Scenery.ECPStringMap.hasMapping | ( | String | key | ) |
Mapping is present.
String Dragengine.Scenery.ECPStringMap.map | ( | String | key | ) |
Map string or null if mapping does not exist.
ECPStringMap Dragengine.Scenery.ECPStringMap.new | ( | String | name | ) |
Create property.
Reimplemented from Dragengine.Scenery.ElementClassProperty.
void Dragengine.Scenery.ECPStringMap.removeAllMappings | ( | ) |
Remove all mappings.
void Dragengine.Scenery.ECPStringMap.setValue | ( | Object | value | ) |
Set value of property from XML decoded value.
Reimplemented from Dragengine.Scenery.ElementClassProperty.