Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.ECPEnumerationList Class Reference

Enumeration value list element class property for use with XML loading. More...

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

Public Member Functions

void add (Enumeration entry)
 Add entry.
void forEach (Block ablock)
 For each entry with block with Enumeration as parameter.
Enumeration getAt (int index)
 Entry at index.
Array getList (StubWithProperties stub, CodecPropertyString codec)
 Entry list modified by stub property if present.
Dictionary getMapping ()
 Mapping between strings and enumerations.
Enumeration getRandom ()
 Get random entry or null if no entries are present.
bool has (Enumeration entry)
 Entry is present.
int indexOf (Enumeration entry)
 Index of first entry or -1 if absent.
ECPEnumerationList new (String name)
 Create property.
ECPEnumerationList new (String name, Set enumerationValues)
void removeAll ()
 Remove all entries.
void setMapping (Dictionary mapping)
 Set mapping between strings and enumerations.
void setMapping (Set enumerationValues)
 Set mapping from set of enumeration values.
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.

Public Attributes

Array pEntries
Dictionary pMapping

Detailed Description

Enumeration value list element class property for use with XML loading.

Version
1.30

Value is an Array of Enumeration values using a dictionary mapping string values to enumeration values.

Member Function Documentation

◆ add()

void Dragengine.Scenery.ECPEnumerationList.add ( Enumeration entry)

Add entry.

References getAt(), and pEntries.

Referenced by getList().

◆ forEach()

void Dragengine.Scenery.ECPEnumerationList.forEach ( Block ablock)

For each entry with block with Enumeration as parameter.

Referenced by getList(), and has().

◆ getAt()

Enumeration Dragengine.Scenery.ECPEnumerationList.getAt ( int index)

Entry at index.

Referenced by add().

◆ getList()

Array Dragengine.Scenery.ECPEnumerationList.getList ( StubWithProperties stub,
CodecPropertyString codec )

Entry list modified by stub property if present.

If named stub property is not present or empty string the stored list is returned. If the named stub property is present it is decoded using codec.

  • "enum1 enum2 ... enumN"

References add(), forEach(), getList(), getRandom(), new(), pEntries, removeAll(), and setValue().

Referenced by getList().

◆ getMapping()

Dictionary Dragengine.Scenery.ECPEnumerationList.getMapping ( )

Mapping between strings and enumerations.

References setMapping().

Referenced by setMapping().

◆ getRandom()

Enumeration Dragengine.Scenery.ECPEnumerationList.getRandom ( )

Get random entry or null if no entries are present.

Referenced by getList().

◆ has()

bool Dragengine.Scenery.ECPEnumerationList.has ( Enumeration entry)

Entry is present.

References forEach(), pMapping, removeAll(), and setMapping().

Referenced by setValue().

◆ indexOf()

int Dragengine.Scenery.ECPEnumerationList.indexOf ( Enumeration entry)

Index of first entry or -1 if absent.

Referenced by setValue().

◆ new() [1/2]

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References new(), and pEntries.

Referenced by getList(), new(), and new().

◆ new() [2/2]

ECPEnumerationList Dragengine.Scenery.ECPEnumerationList.new ( String name,
Set enumerationValues )

References new(), and pMapping.

◆ removeAll()

void Dragengine.Scenery.ECPEnumerationList.removeAll ( )

Remove all entries.

References pEntries.

Referenced by getList(), and has().

◆ setMapping() [1/2]

void Dragengine.Scenery.ECPEnumerationList.setMapping ( Dictionary mapping)

Set mapping between strings and enumerations.

References getMapping(), and pMapping.

Referenced by getMapping(), has(), and setMapping().

◆ setMapping() [2/2]

void Dragengine.Scenery.ECPEnumerationList.setMapping ( Set enumerationValues)

Set mapping from set of enumeration values.

Uses enumeration name as mapping name.

References pMapping, and setMapping().

◆ setValue()

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

Set value of property from XML decoded value.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References has(), indexOf(), and pEntries.

Referenced by getList().

Member Data Documentation

◆ pEntries

Array Dragengine.Scenery.ECPEnumerationList.pEntries

Referenced by add(), getList(), new(), removeAll(), and setValue().

◆ pMapping

Dictionary Dragengine.Scenery.ECPEnumerationList.pMapping

Referenced by has(), new(), setMapping(), and setMapping().


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