CrystalSpace

Public API Reference

Static Public Member Functions
csEventNameRegistry Class Reference

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:
scfImplementation1< csEventNameRegistry, iEventNameRegistry > scfImplementation< csEventNameRegistry > iEventNameRegistry iBase scfImplementationHelper CS::Memory::CustomAllocated iBase

List of all members.

Static Public Member Functions

static csRef< iEventNameRegistryGetRegistry (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.

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

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 2.0 by doxygen 1.7.6.1