Advanced Strategic Command
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
EventTrigger Class Referenceabstract

#include <gameeventsystem.h>

Inheritance diagram for EventTrigger:
Inheritance graph
[legend]

Public Types

enum  State { unfulfilled, fulfilled, finally_fulfilled, finally_failed }
 

Public Member Functions

State state (int player)
 takes the inversion into account, which getState(int) does not More...
 
virtual void readData (tnstream &stream)=0
 
virtual void writeData (tnstream &stream)=0
 
virtual ASCString getDetailledName () const =0
 
virtual ASCString getTypeName () const =0
 
virtual void setup ()=0
 
virtual void arm ()
 
void setMap (GameMap *gamemap_)
 
void setEvent (Event *ev)
 
EventTriggerID getTriggerID ()
 
virtual ~EventTrigger ()
 

Public Attributes

bool invert
 

Protected Member Functions

 EventTrigger (EventTriggerID id)
 
virtual State getState (int player)=0
 
bool isFulfilled ()
 

Protected Attributes

GameMapgamemap
 
Eventevent
 

Detailed Description

Definition at line 59 of file gameeventsystem.h.

Member Enumeration Documentation

Enumerator
unfulfilled 
fulfilled 
finally_fulfilled 
finally_failed 

Definition at line 62 of file gameeventsystem.h.

Constructor & Destructor Documentation

EventTrigger::EventTrigger ( EventTriggerID  id)
inlineprotected

Definition at line 64 of file gameeventsystem.h.

virtual EventTrigger::~EventTrigger ( )
inlinevirtual

Definition at line 89 of file gameeventsystem.h.

Member Function Documentation

virtual void EventTrigger::arm ( )
inlinevirtual
virtual ASCString EventTrigger::getDetailledName ( ) const
pure virtual
virtual State EventTrigger::getState ( int  player)
protectedpure virtual
EventTriggerID EventTrigger::getTriggerID ( )
inline

Definition at line 87 of file gameeventsystem.h.

virtual ASCString EventTrigger::getTypeName ( ) const
pure virtual
bool EventTrigger::isFulfilled ( )
protected
virtual void EventTrigger::readData ( tnstream stream)
pure virtual
void EventTrigger::setEvent ( Event ev)
inline

Definition at line 86 of file gameeventsystem.h.

Referenced by readOldEvent(), and Event::spawnTrigger().

void EventTrigger::setMap ( GameMap gamemap_)
inline

Definition at line 85 of file gameeventsystem.h.

References gamemap.

Referenced by readOldEvent(), and Event::spawnTrigger().

virtual void EventTrigger::setup ( )
pure virtual
EventTrigger::State EventTrigger::state ( int  player)

takes the inversion into account, which getState(int) does not

Definition at line 98 of file gameeventsystem.cpp.

References finally_failed, finally_fulfilled, fulfilled, getState(), invert, and unfulfilled.

Referenced by isFulfilled(), UnitTrigger::triggered(), and EventTriggered::triggered().

virtual void EventTrigger::writeData ( tnstream stream)
pure virtual

Member Data Documentation

Event* EventTrigger::event
protected

Definition at line 67 of file gameeventsystem.h.

Referenced by isFulfilled().

GameMap* EventTrigger::gamemap
protected
bool EventTrigger::invert

Definition at line 74 of file gameeventsystem.h.

Referenced by Event::read(), readOldEvent(), and state().


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