44 #ifndef __EVENT_SYSTEM_H__
45 #define __EVENT_SYSTEM_H__
48 #include "mengeCommon.h"
60 Event *
parseEvent( TiXmlElement * node,
const std::string & specFldr );
106 bool parseEvents( TiXmlElement * node,
const std::string & behaveFldr );
133 friend Event *
parseEvent( TiXmlElement * node,
const std::string & specFldr );
153 #endif // __EVENT_SYSTEM_H__
static void finalizeException(const std::string msg)
Causes an event exception to be thrown based on the the system's tolerance for event configuration er...
Definition: EventSystem.cpp:131
~EventSystem()
Destructor.
Definition: EventSystem.cpp:60
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
HASH_MAP< std::string, EventTarget * > _targets
A mapping from target names to targets.
Definition: EventSystem.h:144
A response to an event trigger. It combines an effect with a target.
Definition: EventResponse.h:59
void finalize()
Finalize the event system.
Definition: EventSystem.cpp:85
friend Event * parseEvent(TiXmlElement *node, const std::string &specFldr)
Parses the xml specification of an event and returns a parsed event.
Definition: Event.cpp:134
The definition of a Menge event.
Definition: Event.h:87
The base class for all event targets.
Definition: EventTarget.h:66
HASH_MAP< std::string, EventEffect * > _effects
A mapping from effect names to effects.
Definition: EventSystem.h:149
The definition of a response to an event.
Definition: EventEffect.h:65
Event * parseEvent(TiXmlElement *node, const std::string &specFldr)
Parses the xml specification of an event and returns a parsed event.
Definition: Event.cpp:134
The main event engine – causes event triggers to be evaluated and effects to be applied.
Definition: EventSystem.h:66
static bool CONSERVATIVE_SETUP
Global variable to indicate how event configuration errors should be handled.
Definition: EventSystem.h:127
void evaluateEvents()
Evaluates the registered events.
Definition: EventSystem.cpp:77
std::vector< Event * > _events
The events to process.
Definition: EventSystem.h:139
bool parseEvents(TiXmlElement *node, const std::string &behaveFldr)
Parses events from an "Events" tag.
Definition: EventSystem.cpp:143
void addEvent(Event *evt)
Adds an event to the system.
Definition: EventSystem.h:86
EventSystem()
Constructor.
Definition: EventSystem.cpp:55