overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Member Functions
gameplay::ScriptTarget::EventRegistry Class Reference

#include <ScriptTarget.h>

List of all members.

Public Member Functions

 EventRegistry ()
 ~EventRegistry ()
const EventaddEvent (const char *name, const char *args=NULL)
unsigned int getEventCount () const
const EventgetEvent (unsigned int index) const
const EventgetEvent (const char *name) const

Detailed Description

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 Documentation

Constructor.

Destructor.


Member Function Documentation

const Event* gameplay::ScriptTarget::EventRegistry::addEvent ( const char *  name,
const char *  args = NULL 
)

Adds a registered event to the registry.

Parameters:
nameThe name of the script event.
argsThe argument string for the event.
Returns:
The added event.
See also:
ScriptController::executeFunction
const Event* gameplay::ScriptTarget::EventRegistry::getEvent ( unsigned int  index) const

Returns the event with the given index.

Parameters:
indexThe index of the event to retrieve.
Returns:
The event for the given index.
const Event* gameplay::ScriptTarget::EventRegistry::getEvent ( const char *  name) const

Returns the event that matches the given name.

Parameters:
nameThe name of the event to search for.
Returns:
The matching event, or NULL if no such event exists.

Returns the number of registered script events.

Returns:
The number of script events registered.
 All Classes Functions Variables Typedefs Enumerations Enumerator