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

Mapping strings class property for use with XML loading. More...

Inheritance diagram for Dragengine.Scenery.ECPStringMap:
Dragengine.Scenery.ElementClassProperty

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

Detailed Description

Mapping strings class property for use with XML loading.

Member Function Documentation

◆ addMapping()

void Dragengine.Scenery.ECPStringMap.addMapping ( String  key,
String  value 
)

Add mapping replacing existing one if present.

◆ forEachMapping()

void Dragengine.Scenery.ECPStringMap.forEachMapping ( Block  ablock)

Visit mappings with block.

First block parameter is String key. Second block parameter is String value.

◆ getMap()

Dictionary Dragengine.Scenery.ECPStringMap.getMap ( StubWithProperties  stub,
CodecPropertyString  codec 
)

String map modified by stub property if present.

Version
1.19

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

  • "key1:value1 key2:value2 ... keyN:valueN"

◆ getMappingCount()

int Dragengine.Scenery.ECPStringMap.getMappingCount ( )

Number of mappings.

◆ hasMapping()

bool Dragengine.Scenery.ECPStringMap.hasMapping ( String  key)

Mapping is present.

◆ map()

String Dragengine.Scenery.ECPStringMap.map ( String  key)

Map string or null if mapping does not exist.

◆ new()

ECPStringMap Dragengine.Scenery.ECPStringMap.new ( String  name)

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ removeAllMappings()

void Dragengine.Scenery.ECPStringMap.removeAllMappings ( )

Remove all mappings.

◆ setValue()

void Dragengine.Scenery.ECPStringMap.setValue ( Object  value)

Set value of property from XML decoded value.

Reimplemented from Dragengine.Scenery.ElementClassProperty.


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