|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 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

## 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

gameplay::ScriptTarget::EventRegistry::EventRegistry | ( |  | ) |

Constructor.

gameplay::ScriptTarget::EventRegistry::~EventRegistry | ( |  | ) |

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:

  name | The name of the script event.
  args | The 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:

  index | The 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:

  name | The name of the event to search for.

Returns:
  The matching event, or NULL if no such event exists.

unsigned int gameplay::ScriptTarget::EventRegistry::getEventCount | ( |  | ) | const

Returns the number of registered script events.

Returns:
  The number of script events registered.

All Classes Functions Variables Typedefs Enumerations Enumerator