Drag[en]gine Script Module DragonScript Script API  1.0
TSTriggerTarget Class Reference

Target in a trigger table. More...

Inheritance diagram for TSTriggerTarget:

Public Member Functions

void addListener (TSTriggerListener listener)
 Add listener. More...
void addListenerIfAbsent (TSTriggerListener listener)
 Add listener if absent. More...
void fire ()
 Fire trigger. More...
void fullReset ()
 Fully reset trigger. More...
bool getFired ()
 Target is currently fired. More...
bool getHasFired ()
 Target has ever fired. More...
int getListenerCount ()
 Number of listeners. More...
String getName ()
 Name. More...
TSTriggerTarget new (String name)
 Create trigger target. More...
void notifyListeners ()
 Notify all listeners. More...
void removeListener (TSTriggerListener listener)
 Remove listener. More...
void removeListenerIfPresent (TSTriggerListener listener)
 Remove listener if present. More...
void reset ()
 Reset trigger. More...
void setFired (bool fired)
 Set if target is currently fired. More...
void setHasFired (bool hasFired)
 Set if target has ever fired. More...
void writeToFile (FileWriter writer)
 Write trigger target to file. More...

Static Public Member Functions

static TSTriggerTarget readFromFile (FileReader reader)
 Read trigger target from file. More...

Detailed Description

Target in a trigger table.

Triggers can set or reset the target. Whenever the state of the target changes all listeners are notified. Elements using a trigger expression add themselves to all the targets they use in the trigger expression.

Member Function Documentation

§ addListener()

void addListener ( TSTriggerListener  listener)

Add listener.

§ addListenerIfAbsent()

void addListenerIfAbsent ( TSTriggerListener  listener)

Add listener if absent.

§ fire()

void fire ( )

Fire trigger.

§ fullReset()

void fullReset ( )

Fully reset trigger.

§ getFired()

bool getFired ( )

Target is currently fired.

§ getHasFired()

bool getHasFired ( )

Target has ever fired.

§ getListenerCount()

int getListenerCount ( )

Number of listeners.

§ getName()

String getName ( )


§ new()

TSTriggerTarget new ( String  name)

Create trigger target.

§ notifyListeners()

void notifyListeners ( )

Notify all listeners.

§ readFromFile()

static TSTriggerTarget readFromFile ( FileReader  reader)

Read trigger target from file.

§ removeListener()

void removeListener ( TSTriggerListener  listener)

Remove listener.

§ removeListenerIfPresent()

void removeListenerIfPresent ( TSTriggerListener  listener)

Remove listener if present.

§ reset()

void reset ( )

Reset trigger.

§ setFired()

void setFired ( bool  fired)

Set if target is currently fired.

§ setHasFired()

void setHasFired ( bool  hasFired)

Set if target has ever fired.

§ writeToFile()

void writeToFile ( FileWriter  writer)

Write trigger target to file.

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