Advanced Strategic Command
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Event Class Reference

#include <gameeventsystem.h>

Classes

struct  Delayedexecution
 

Public Types

enum  Status { Untriggered, Triggered, Timed, Executed }
 
enum  TriggerConnection { AND, OR }
 
typedef vector< EventTrigger * > Trigger
 

Public Member Functions

 Event (GameMap &map_)
 
const GameMapgetMap () const
 
void check (MapDisplayInterface *md)
 
void execute (MapDisplayInterface *md)
 
void spawnAction (EventActionID eai)
 
EventTriggerspawnTrigger (EventTriggerID eti)
 
Eventoperator= (const Event &ev)
 
void read (tnstream &stream)
 
void write (tnstream &stream)
 
void arm ()
 
virtual ~Event ()
 

Public Attributes

enum Event::Status status
 
Trigger trigger
 
int id
 
int playerBitmap
 
ASCString description
 
GameTime triggerTime
 
struct Event::Delayedexecution delayedexecution
 
int reArmNum
 the number of times this event can be executed; makes only sense in cunjunction with delayedexecution More...
 
EventActionaction
 
enum Event::TriggerConnection triggerConnection
 
sigc::signal< void > executed
 

Detailed Description

Definition at line 114 of file gameeventsystem.h.

Member Typedef Documentation

typedef vector<EventTrigger*> Event::Trigger

Definition at line 124 of file gameeventsystem.h.

Member Enumeration Documentation

Enumerator
Untriggered 
Triggered 
Timed 
Executed 

Definition at line 122 of file gameeventsystem.h.

Enumerator
AND 
OR 

Definition at line 141 of file gameeventsystem.h.

Constructor & Destructor Documentation

Event::Event ( GameMap map_)
Event::~Event ( )
virtual

Definition at line 352 of file gameeventsystem.cpp.

Member Function Documentation

void Event::arm ( )

Definition at line 340 of file gameeventsystem.cpp.

References GameTime::comp(), GameMap::eventTimes, status, Timed, trigger, and triggerTime.

Referenced by execute().

void Event::check ( MapDisplayInterface md)
void Event::execute ( MapDisplayInterface md)
const GameMap* Event::getMap ( void  ) const
inline

Definition at line 120 of file gameeventsystem.h.

Referenced by EventEditor::EventEditor().

Event& Event::operator= ( const Event ev)
void Event::read ( tnstream stream)
void Event::spawnAction ( EventActionID  eai)

Definition at line 325 of file gameeventsystem.cpp.

References action, and EventAction::setMap().

Referenced by read().

EventTrigger * Event::spawnTrigger ( EventTriggerID  eti)

Definition at line 331 of file gameeventsystem.cpp.

References EventTrigger::setEvent(), and EventTrigger::setMap().

Referenced by read().

void Event::write ( tnstream stream)

Member Data Documentation

EventAction* Event::action
struct Event::Delayedexecution Event::delayedexecution

Referenced by execute(), read(), and write().

ASCString Event::description
sigc::signal<void> Event::executed

Definition at line 155 of file gameeventsystem.h.

Referenced by EventTriggered::arm(), and execute().

int Event::id

Definition at line 127 of file gameeventsystem.h.

Referenced by readOldEvent().

int Event::playerBitmap
int Event::reArmNum

the number of times this event can be executed; makes only sense in cunjunction with delayedexecution

Definition at line 138 of file gameeventsystem.h.

Referenced by execute(), read(), and write().

enum Event::Status Event::status
Trigger Event::trigger

Definition at line 125 of file gameeventsystem.h.

Referenced by arm(), check(), EventEditor::EventEditor(), read(), readOldEvent(), and write().

enum Event::TriggerConnection Event::triggerConnection
GameTime Event::triggerTime

Definition at line 130 of file gameeventsystem.h.

Referenced by arm(), Event(), execute(), read(), and write().


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