|
Drag[en]gine Script Module DragonScript 1.35
|
Enumeration value list element class property for use with XML loading. More...
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 |
Enumeration value list element class property for use with XML loading.
Value is an Array of Enumeration values using a dictionary mapping string values to enumeration values.
| void Dragengine.Scenery.ECPEnumerationList.add | ( | Enumeration | entry | ) |
| void Dragengine.Scenery.ECPEnumerationList.forEach | ( | Block | ablock | ) |
| Enumeration Dragengine.Scenery.ECPEnumerationList.getAt | ( | int | index | ) |
Entry at index.
Referenced by add().
| 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.
References add(), forEach(), getList(), getRandom(), new(), pEntries, removeAll(), and setValue().
Referenced by getList().
| Dictionary Dragengine.Scenery.ECPEnumerationList.getMapping | ( | ) |
| Enumeration Dragengine.Scenery.ECPEnumerationList.getRandom | ( | ) |
Get random entry or null if no entries are present.
Referenced by getList().
| bool Dragengine.Scenery.ECPEnumerationList.has | ( | Enumeration | entry | ) |
Entry is present.
References forEach(), pMapping, removeAll(), and setMapping().
Referenced by setValue().
| int Dragengine.Scenery.ECPEnumerationList.indexOf | ( | Enumeration | entry | ) |
Index of first entry or -1 if absent.
Referenced by setValue().
| ECPEnumerationList Dragengine.Scenery.ECPEnumerationList.new | ( | String | name | ) |
| ECPEnumerationList Dragengine.Scenery.ECPEnumerationList.new | ( | String | name, |
| Set | enumerationValues ) |
| void Dragengine.Scenery.ECPEnumerationList.removeAll | ( | ) |
| void Dragengine.Scenery.ECPEnumerationList.setMapping | ( | Dictionary | mapping | ) |
Set mapping between strings and enumerations.
References getMapping(), and pMapping.
Referenced by getMapping(), has(), and setMapping().
| void Dragengine.Scenery.ECPEnumerationList.setMapping | ( | Set | enumerationValues | ) |
Set mapping from set of enumeration values.
Uses enumeration name as mapping name.
References pMapping, and setMapping().
| void Dragengine.Scenery.ECPEnumerationList.setValue | ( | Object | value | ) |
| Array Dragengine.Scenery.ECPEnumerationList.pEntries |
Referenced by add(), getList(), new(), removeAll(), and setValue().
| Dictionary Dragengine.Scenery.ECPEnumerationList.pMapping |
Referenced by has(), new(), setMapping(), and setMapping().