csEventNameRegistry Class Reference
[Event handling]
The csEventNameRegistry transforms textual event names (e.g., "crystalspace.input.joystick.3.button") into easier-to-manage csEventIDs (which, in non-debug builds, are really just csStringIDs).
More...
#include <csutil/eventnames.h>
Inheritance diagram for csEventNameRegistry:

iEventNameRegistry implementation | |
csEventID | GetID (const csString &name) |
Get the csEventID for an event name string (e.g., "crystalspace.input.keyboard.down"). | |
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"). | |
const char * | GetString (const csEventID id) |
Get the name represented by a csEventID. | |
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 Public Member Functions | |
static csEventID | GetID (iObjectRegistry *object_reg, const csString &name) |
static csEventID | GetID (iEventNameRegistry *name_reg, const csString &name) |
static csRef< iEventNameRegistry > | GetRegistry (iObjectRegistry *object_reg) |
Return the singleton iEventNameRegistry object registered in the iObjectRegistry (or create one if none yet exists). | |
static bool | IsKindOf (iObjectRegistry *object_reg, csEventID name1, csEventID name2) |
static bool | IsKindOf (iEventNameRegistry *name_reg, csEventID name1, csEventID name2) |
Detailed Description
The csEventNameRegistry transforms textual event names (e.g., "crystalspace.input.joystick.3.button") into easier-to-manage csEventIDs (which, in non-debug builds, are really just csStringIDs).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 62 of file eventnames.h.
Member Function Documentation
|
Get the csEventID for an event name string (e.g., "crystalspace.input.keyboard.down").
Implements iEventNameRegistry. |
|
Get the csEventID of the parent of the current event (e.g., the parent of "crystalspace.input.mouse" is "crystalspace.input").
Implements iEventNameRegistry. |
|
Return the singleton iEventNameRegistry object registered in the iObjectRegistry (or create one if none yet exists).
Referenced by csevCanvasOp(), csevJoystick(), csevJoystickOp(), csevMouse(), and csevMouseOp(). |
|
Get the name represented by a csEventID.
Implements iEventNameRegistry. |
|
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. |
|
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
Generated for Crystal Space by doxygen 1.4.6