csEventNameRegistry Class Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

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

Static Public Member Functions
csEventNameRegistry Class Reference
Event handling

The csEventNameRegistry transforms textual event names (e.g., "crystalspace.input.joystick.3.button") into easier-to-manage csEventID's (which, in non-debug builds, are really just csStringID's). More...

`#include <csutil/eventnames.h>`

Inheritance diagram for csEventNameRegistry:

List of all members.

## Static Public Member Functions
static csRef< iEventNameRegistry > | GetRegistry (iObjectRegistry *object_reg)
| Return the singleton iEventNameRegistry object registered in the iObjectRegistry (or create one if none yet exists).
## iEventNameRegistry implementation
csEventID | GetID (const char *name)
| Get the csEventID for an event name string (e.g., "crystalspace.input.keyboard.down").
const char * | GetString (const csEventID id)
| Get the name represented by a csEventID.
csEventID | GetParentID (const csEventID id)
| Get the csEventID of the parent of the current event (e.g., the parent of "crystalspace.input.mouse" is "crystalspace.input").
bool | IsImmediateChildOf (const csEventID child, const csEventID parent)
| Determine whether the name of the first csEventID is an immediate child of the name of the second csEventID (e.g., "crysalspace.input.mouse" is an immediate child of "crystalspace.input" but not of "crystalspace" or of "").
bool | IsKindOf (const csEventID child, const csEventID parent)
| Determine whether the name of the first csEventID is equivalent to or a child of the name of the second csEventID (e.g., "crystalspace.input.mouse" is a "kind" of "crystalspace.input.mouse", "crystalspace.input", "crystalspace", and "", but not of "crystalspace.input.mouse.2").
static const char * | GetString (iObjectRegistry *object_reg, csEventID id)

## Detailed Description

The csEventNameRegistry transforms textual event names (e.g., "crystalspace.input.joystick.3.button") into easier-to-manage csEventID's (which, in non-debug builds, are really just csStringID's).

Also offers easy methods for querying parentage relationships between two event names.

Note that any modules across which event names will be shared need to call csEventNameRegistry::Register() on the same iObjectRegistry.

Definition at line 63 of file eventnames.h.

## Member Function Documentation

csEventID csEventNameRegistry::GetID | ( | const char * | name | ) | `[virtual]`

Get the csEventID for an event name string (e.g., "crystalspace.input.keyboard.down").

Implements iEventNameRegistry.

csEventID csEventNameRegistry::GetParentID | ( | const csEventID | id | ) | `[virtual]`

Get the csEventID of the parent of the current event (e.g., the parent of "crystalspace.input.mouse" is "crystalspace.input").

Implements iEventNameRegistry.

static csRef<iEventNameRegistry> csEventNameRegistry::GetRegistry | ( | iObjectRegistry * | object_reg | ) | `[static]`

Return the singleton iEventNameRegistry object registered in the iObjectRegistry (or create one if none yet exists).

const char* csEventNameRegistry::GetString | ( | const csEventID | id | ) | `[virtual]`

Get the name represented by a csEventID.

Implements iEventNameRegistry.

bool csEventNameRegistry::IsImmediateChildOf | ( | const csEventID | child,
|  | const csEventID | parent
| ) |  | `[virtual]`

Determine whether the name of the first csEventID is an immediate child of the name of the second csEventID (e.g., "crysalspace.input.mouse" is an immediate child of "crystalspace.input" but not of "crystalspace" or of "").

Implements iEventNameRegistry.

bool csEventNameRegistry::IsKindOf | ( | const csEventID | child,
|  | const csEventID | parent
| ) |  | `[virtual]`

Determine whether the name of the first csEventID is equivalent to or a child of the name of the second csEventID (e.g., "crystalspace.input.mouse" is a "kind" of "crystalspace.input.mouse", "crystalspace.input", "crystalspace", and "", but not of "crystalspace.input.mouse.2").

Implements iEventNameRegistry.

The documentation for this class was generated from the following file:

- csutil/eventnames.h