#include <ScriptTarget.h>
Public Member Functions | |
EventRegistry () | |
~EventRegistry () | |
const Event * | addEvent (const char *name, const char *args=NULL) |
unsigned int | getEventCount () const |
const Event * | getEvent (unsigned int index) const |
const Event * | getEvent (const char *name) const |
Script event registry that defines the supported script events for a ScriptTarget.
This class should generally only be used via the GP_REGISTER_SCRIPT_EVENTS macro.
Constructor.
Destructor.
const Event* gameplay::ScriptTarget::EventRegistry::addEvent | ( | const char * | name, |
const char * | args = NULL |
||
) |
Adds a registered event to the registry.
name | The name of the script event. |
args | The argument string for the event. |
const Event* gameplay::ScriptTarget::EventRegistry::getEvent | ( | unsigned int | index | ) | const |
Returns the event with the given index.
index | The index of the event to retrieve. |
const Event* gameplay::ScriptTarget::EventRegistry::getEvent | ( | const char * | name | ) | const |
Returns the event that matches the given name.
name | The name of the event to search for. |
unsigned int gameplay::ScriptTarget::EventRegistry::getEventCount | ( | ) | const |
Returns the number of registered script events.