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

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

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

Public Member Functions

void copyValue (ElementClass elementClass, ElementClassProperty property)
 Copy value from another element class property of the same type.
Enumeration getEnumeration (StubWithProperties stub)
 Enumeration value modified by stub property if present.
Dictionary getMapping ()
 Mapping between strings and enumerations.
ECPEnumeration new (String name, Enumeration value)
 Create property.
ECPEnumeration new (String name, Set enumerationValues, Enumeration value)
void setEnumeration (Enumeration value)
 Set value.
void setMapping (Dictionary mapping)
 Set mapping between strings and enumerations.
void setMapping (Set enumerationValues)
 Set mapping from set of enumeration values.
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.
ElementClassProperty new (String name)
 Create property.
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported.
void setValue (Object value)
 Set value of property from XML decoded value.

Detailed Description

Enumeration value element class property for use with XML loading.

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

Member Function Documentation

◆ copyValue()

void Dragengine.Scenery.ECPEnumeration.copyValue ( ElementClass elementClass,
ElementClassProperty property )

Copy value from another element class property of the same type.

Version
1.17

References getEnumeration().

Referenced by getEnumeration().

◆ getEnumeration()

Enumeration Dragengine.Scenery.ECPEnumeration.getEnumeration ( StubWithProperties stub)

Enumeration value modified by stub property if present.

If named stub property is not present or empty string the stored enumeration value is returned. If the named stub property is present it is mapped against the mapping and the matching enumeration value returned. If no match is found an exception is thrown.

References copyValue(), getEnumeration(), new(), setEnumeration(), and Dragengine.Scenery.ElementClassProperty.setValue().

Referenced by copyValue(), and getEnumeration().

◆ getMapping()

Dictionary Dragengine.Scenery.ECPEnumeration.getMapping ( )

Mapping between strings and enumerations.

Referenced by setMapping().

◆ new() [1/2]

ECPEnumeration Dragengine.Scenery.ECPEnumeration.new ( String name,
Enumeration value )

Create property.

References new().

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

◆ new() [2/2]

ECPEnumeration Dragengine.Scenery.ECPEnumeration.new ( String name,
Set enumerationValues,
Enumeration value )

References new(), and setMapping().

◆ setEnumeration()

void Dragengine.Scenery.ECPEnumeration.setEnumeration ( Enumeration value)

Set value.

Allowed if enumeration is part of mapping.

References setMapping().

Referenced by getEnumeration().

◆ setMapping() [1/2]

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

Set mapping between strings and enumerations.

References getMapping().

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

◆ setMapping() [2/2]

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

Set mapping from set of enumeration values.

Uses enumeration name as mapping name.

References setMapping().


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