Drag[en]gine Script Module DragonScript 1.32.1
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.

◆ forEach()

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

For each entry with block with Enumeration as parameter.

◆ getAt()

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

Entry at index.

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

◆ getMapping()

Dictionary Dragengine.Scenery.ECPEnumerationList.getMapping ( )

Mapping between strings and enumerations.

◆ getRandom()

Enumeration Dragengine.Scenery.ECPEnumerationList.getRandom ( )

Get random entry or null if no entries are present.

◆ has()

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

Entry is present.

◆ indexOf()

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

Index of first entry or -1 if absent.

◆ new() [1/2]

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ new() [2/2]

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

◆ removeAll()

void Dragengine.Scenery.ECPEnumerationList.removeAll ( )

Remove all entries.

◆ setMapping() [1/2]

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

Set mapping between strings and enumerations.

◆ setMapping() [2/2]

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

Set mapping from set of enumeration values.

Uses enumeration name as mapping name.

◆ setValue()

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

Set value of property from XML decoded value.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

Member Data Documentation

◆ pEntries

Array Dragengine.Scenery.ECPEnumerationList.pEntries

◆ pMapping

Dictionary Dragengine.Scenery.ECPEnumerationList.pMapping

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