TSTK Reference: Event Router

From RGWiki

Revision as of 22:52, 13 September 2009 by Emaurina (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

TSTK Reference: common - EventRouter

EventBind.cs

The following section documents all of the functions found in the file: TSTK/common/EventRouter/EventBind.cs.

ActionMap::bindEvent( %this, %device, %action, %object, %callback )

Description: It is suggested that you use the multiBind variant instead as it is more lightweight. This is being retained for legacy purposes ONLY.
Warning: This is very similar to the bindMulti code in actionmap.cs, but uses the event router system.

Top

ActionMap::unbindEvent( %this, %device, %action, %object, %callback )

Description: It is suggested that you use the multiBind variant instead as it is more lightweight. This is being retained for legacy purposes ONLY.
Warning: This is very similar to the bindMulti code in actionmap.cs, but uses the event router system.

Top

EventRouter.cs

The following section documents all of the functions found in the file: TSTK/common/EventRouter/EventRouter.cs.

initializeEventRouterSystem( )

Description: Initialize the event router system and create the global event router "GER".

Top

cleanupEventRouterSystem( )

Description: Shutdown the event router system and destroy the global event router "GER" and all of its subrouters.

Top

createEventRouter( %name )

Description: Create a new event router named %name.

Top

eventRouter::registerEvent( %theRouter, %eventName )

Description: Add new event to list of catchable events.

Top

eventRouter::isValidEvent( %theRouter, %eventName )

Description: Checks to see if %eventName is catchable event

Top

eventRouter::enableEvent( %theRouter, %eventName, %enabled )

Description: Enables/disables response to event %eventName

Top

eventRouter::isEventEnabled( %theRouter, %eventName )

Description: Return true if the specified event is enabled.

Top

eventRouter::enable( %theRouter, %enabled )

Description: Enables/disables router

Top

eventRouter::isEnabled( %theRouter )

Description: Returns true if this router is enabled.

Top

eventRouter::delete( %theRouter )

Description: Deletes the event router and contents

Top

eventRouter::registerHandler( %theRouter, %eventName , %handler )

Description: Registers a handler (function) to catch an event.

Top

eventRouter::registerHandlerMethod( %theRouter, %eventName , %handler , %obj )

Description: Registers a handler method to catch an event, calls this method on registered object.

Top

eventRouter::registerChainedEvent( %theRouter, %eventName , %chainedEventName )

Description: Registers an event to fired when %eventName is fired.

Top

eventRouter::unregisterHandler( %theRouter, %eventName , %handler )

Description: Removes the specified handler(s) for the named event.

Top

eventRouter::unregisterMethodHandler( %theRouter, %eventName , %handlerMethod , %obj )

Description: Removes the specified handler(s) method for the named event if it/they match the specified object.

Top

eventRouter::unregisterDeadObjects( %theRouter )

Description: Search the router for any handlers associated with objects that no longer exist and unregister the handlers.

Top

eventRouter::unregisterObject( %theRouter, %obj )

Description: Find all handlers associated with a specific object and unregister them with this handler.

Top

postEvent( %eventName , %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 )

Description: Post a named event to the global event router with up to 10 optional arguments.

Top

eventRouter::postEvent( %theRouter, %eventName , %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 )

Description: Post a named event to a specific router with up to 10 optional arguments.

Top

eventRouter::fireChainedEvents( %theRouter, %eventName , %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 )

Description: Fire event chains for a specific event name for on this event router, passing in up to 10 optional arguments.

Top

getCurrentlyProcessingEvent()

Description: Determine what the currently processing event is.

Top

isEventProcessing( %eventName )

Description:
Determine whether the specified event is being processed by the global event handler. This can be used in handlers that post to insure that they don't enter an endless loop. i.e. Event A -> Event B -> ... -> Event A

Top

Personal tools