The main event engine – causes event triggers to be evaluated and effects to be applied.
More...
#include <EventSystem.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 errors. More...
|
|
|
class | Event |
|
class | EventEffect |
|
class | EventTarget |
|
class | EventResponse |
|
Event * | parseEvent (TiXmlElement *node, const std::string &specFldr) |
| Parses the xml specification of an event and returns a parsed event. More...
|
|
The main event engine – causes event triggers to be evaluated and effects to be applied.
void Menge::EventSystem::addEvent |
( |
Event * |
evt | ) |
|
|
inline |
Adds an event to the system.
The system becomes the owner of the event and will take responsibility for deleting it.
- Parameters
-
evt | The event to add to the system. |
void Menge::EventSystem::finalizeException |
( |
const std::string |
msg | ) |
|
|
static |
Causes an event exception to be thrown based on the the system's tolerance for event configuration errors.
- Parameters
-
msg | The event associated with the problem. |
- Exceptions
-
EventException | if the system is not conservative; i.e., configuration errors will be noted, but simulation will continue. |
EventFatalException | if the system is conservative. |
bool Menge::EventSystem::parseEvents |
( |
TiXmlElement * |
node, |
|
|
const std::string & |
behaveFldr |
|
) |
| |
Parses events from an "Events" tag.
- Parameters
-
node | The node containing the event system description. |
behaveFldr | The folder containing the behavior specification. all event paths are defined relative to this folder. |
- Returns
- True if parsing was successful, false otherwise.
Event* parseEvent |
( |
TiXmlElement * |
node, |
|
|
const std::string & |
specFldr |
|
) |
| |
|
friend |
Parses the xml specification of an event and returns a parsed event.
The event instance will still need to be finalized.
- Parameters
-
node | The tiny xml node containing the event specification. |
specFldr | The path to the specification file. All external resource references in the spec file are defined relative to this folder. |
- Returns
- A new instance of an Event. Null if there is a parsing error. The caller assumes responsibility to delete the instance.
bool Menge::EventSystem::CONSERVATIVE_SETUP = true |
|
static |
Global variable to indicate how event configuration errors should be handled.
If true, event configuration errors result in fatal exceptions, if false they are merely warnings.
The documentation for this class was generated from the following files:
- src/menge/MengeCore/Agents/Events/EventSystem.h
- src/menge/MengeCore/Agents/Events/EventSystem.cpp