CrystalSpace

Public API Reference

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:

Inheritance graph
[legend]

List of all members.

iEventNameRegistry implementation

csEventID GetID (const char *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 const char * GetString (iObjectRegistry *object_reg, csEventID id)

Static Public Member Functions

static csEventID GetID (iObjectRegistry *object_reg, const char *name)
static csEventID GetID (iEventNameRegistry *name_reg, const char *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 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).

Referenced by csevCanvasOp(), csevJoystick(), csevJoystickOp(), csevMouse(), and csevMouseOp().

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:
Generated for Crystal Space 1.2.1 by doxygen 1.5.3