## Public API Reference

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

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iEventNameRegistry Struct Reference
[Event handling]

This interface represents a general event name resolver. More...

`#include <iutil/eventnames.h>`

Inheritance diagram for iEventNameRegistry:

[legend]
List of all members.

## Public Member Functions

virtual csEventID | GetID (const csString &name)=0
| Get the csEventID for an event name string (e.g., "crystalspace.input.keyboard.down").
virtual csEventID | GetParentID (const csEventID id)=0
| Get the csEventID of the parent of the current event (e.g., the parent of "crystalspace.input.mouse" is "crystalspace.input").
virtual const char * | GetString (const csEventID id)=0
| Get the name represented by a csEventID.
virtual bool | IsImmediateChildOf (const csEventID child, const csEventID parent)=0
| 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 "").
virtual bool | IsKindOf (const csEventID child, const csEventID parent)=0
| 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").

## Detailed Description

This interface represents a general event name resolver.

Event name resolvers transform string representations of event names (e.g., "crystalspace.input.joystick.2.move") into csEventIDs, which are used to key event subscription and delivery. Typically, one instance of this object is available from the shared-object registry (iObjectRegistry).

Main creators of instances implementing this interface:

- csInitializer::CreateEnvironment()
- csInitializer::CreateEventNameRegistry()

Main ways to get pointers to this interface:

- csQueryRegistry()

Definition at line 59 of file eventnames.h.

## Member Function Documentation

virtual csEventID iEventNameRegistry::GetID | ( | const csString & | name | ) | `[pure virtual]`

| Get the csEventID for an event name string (e.g., "crystalspace.input.keyboard.down"). Implemented in csEventNameRegistry. Referenced by csevJoystick(), csevJoystickOp(), csevMouse(), csevMouseOp(), and csEventNameRegistry::GetID().

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

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

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

| Get the name represented by a csEventID. Implemented in csEventNameRegistry.

virtual bool iEventNameRegistry::IsImmediateChildOf | ( | const csEventID | child,
|  | const csEventID | parent
| ) | `[pure 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 ""). Implemented in csEventNameRegistry.

virtual bool iEventNameRegistry::IsKindOf | ( | const csEventID | child,
|  | const csEventID | parent
| ) | `[pure 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"). Implemented in csEventNameRegistry. Referenced by csEventNameRegistry::IsKindOf().

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

- iutil/eventnames.h