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

Rule resolving element data. More...

Inheritance diagram for Dragengine.Utils.TRRElement:
Dragengine.Utils.TagResolverRule

Public Member Functions

Element getElement ()
 Element.
byte getSeparator ()
 Parameter separate character.
TRRElement new (Element element)
 Create resolve rule.
String resolveTag (String parameters, Object context)
 Resolve tag returning text to output instead of the tag.
void setSeparator (byte separator)
 Set parameter separate character.

Public Attributes

Element pElement
byte pSeparator

Detailed Description

Rule resolving element data.

Version
1.26

Supports the following tags:

{action:id}

Resolves to Element#getID() formatted as "0hID" where ID is hexadecimal.

{action:class}

Resolves to ElementClass#getClassname() of Element#getClass().

{action:property,name[,defaultValue]}

Resolves to StubWithProperties#getPropertyValueFor() of Element#getStub(). If property is absent "defaultValue" is used. If "defaultValue" is absent empty string is used.

{action:worldProperty,name[,defaultValue]}

Resolves to StubWithProperties#getPropertyValueFor() of Element#getGameWorld(). If element is not in a game world or property is absent "defaultValue" is used. If "defaultValue" is absent empty string is used.

Member Function Documentation

◆ getElement()

Element Dragengine.Utils.TRRElement.getElement ( )

Element.

References pElement, and pSeparator.

Referenced by setSeparator().

◆ getSeparator()

byte Dragengine.Utils.TRRElement.getSeparator ( )

Parameter separate character.

Referenced by resolveTag().

◆ new()

TRRElement Dragengine.Utils.TRRElement.new ( Element element)

Create resolve rule.

References new().

Referenced by new().

◆ resolveTag()

String Dragengine.Utils.TRRElement.resolveTag ( String parameters,
Object context )

Resolve tag returning text to output instead of the tag.

Parameters
parametersParameters inside tag.
contextObject in the context of which the resolving is done.

Implements Dragengine.Utils.TagResolverRule.

References getSeparator(), pElement, pSeparator, resolveTag(), and setSeparator().

Referenced by resolveTag().

◆ setSeparator()

void Dragengine.Utils.TRRElement.setSeparator ( byte separator)

Set parameter separate character.

References getElement(), and pElement.

Referenced by resolveTag().

Member Data Documentation

◆ pElement

Element Dragengine.Utils.TRRElement.pElement

◆ pSeparator

byte Dragengine.Utils.TRRElement.pSeparator

Referenced by getElement(), and resolveTag().


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