|
Drag[en]gine Script Module DragonScript 1.35
|
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. | |
| void | forEachMapping (Block ablock) |
| Visit mappings with block. | |
| Dictionary | getMap (StubWithProperties stub, CodecPropertyString codec) |
| String map modified by stub property if present. | |
| int | getMappingCount () |
| Number of mappings. | |
| bool | hasMapping (String key) |
| Mapping is present. | |
| String | map (String key) |
| Map string or null if mapping does not exist. | |
| ECPStringMap | new (String name) |
| Create property. | |
| void | removeAllMappings () |
| Remove all mappings. | |
| void | setValue (Object value) |
| Set value of property from XML decoded value. | |
| Public Member Functions inherited from Dragengine.Scenery.ElementClassProperty | |
| void | dispose () |
| Dispose of element class property to break reference loops. | |
| String | getName () |
| Name. | |
| bool | logPreloadProblems (ElementClass elementClass, Console console) |
| Log preloading problems. | |
| void | preloadResources (ElementClass elementClass, PreloadCounter counter) |
| Preload resources if supported. | |
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.
References forEachMapping().
Referenced by setValue().
| void Dragengine.Scenery.ECPStringMap.forEachMapping | ( | Block | ablock | ) |
Visit mappings with block.
First block parameter is String key. Second block parameter is String value.
Referenced by addMapping().
| 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))".
References getMap(), new(), and setValue().
Referenced by getMap().
| int Dragengine.Scenery.ECPStringMap.getMappingCount | ( | ) |
| bool Dragengine.Scenery.ECPStringMap.hasMapping | ( | String | key | ) |
| String Dragengine.Scenery.ECPStringMap.map | ( | String | key | ) |
Map string or null if mapping does not exist.
Referenced by hasMapping().
| ECPStringMap Dragengine.Scenery.ECPStringMap.new | ( | String | name | ) |
Create property.
Reimplemented from Dragengine.Scenery.ElementClassProperty.
References new().
Referenced by getMap(), new(), and setValue().
| void Dragengine.Scenery.ECPStringMap.removeAllMappings | ( | ) |
Remove all mappings.
Referenced by setValue().
| void Dragengine.Scenery.ECPStringMap.setValue | ( | Object | value | ) |
Set value of property from XML decoded value.
Reimplemented from Dragengine.Scenery.ElementClassProperty.
References addMapping(), new(), and removeAllMappings().
Referenced by getMap().