Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
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.

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.

References forEachMapping().

Referenced by setValue().

◆ forEachMapping()

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

◆ 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"

References getMap(), new(), and setValue().

Referenced by getMap().

◆ getMappingCount()

int Dragengine.Scenery.ECPStringMap.getMappingCount ( )

Number of mappings.

References getMappingCount().

Referenced by getMappingCount().

◆ hasMapping()

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

Mapping is present.

References hasMapping(), and map().

Referenced by hasMapping().

◆ map()

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

Map string or null if mapping does not exist.

Referenced by hasMapping().

◆ new()

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References new().

Referenced by getMap(), new(), and setValue().

◆ removeAllMappings()

void Dragengine.Scenery.ECPStringMap.removeAllMappings ( )

Remove all mappings.

Referenced by setValue().

◆ 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().


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