From RGWiki
Contents
- 1 TSTK Reference: common - EventRouter
- 1.1 EventBind.cs
- 1.2 EventRouter.cs
- 1.2.1 initializeEventRouterSystem( )
- 1.2.2 cleanupEventRouterSystem( )
- 1.2.3 createEventRouter( %name )
- 1.2.4 eventRouter::registerEvent( %theRouter, %eventName )
- 1.2.5 eventRouter::isValidEvent( %theRouter, %eventName )
- 1.2.6 eventRouter::enableEvent( %theRouter, %eventName, %enabled )
- 1.2.7 eventRouter::isEventEnabled( %theRouter, %eventName )
- 1.2.8 eventRouter::enable( %theRouter, %enabled )
- 1.2.9 eventRouter::isEnabled( %theRouter )
- 1.2.10 eventRouter::delete( %theRouter )
- 1.2.11 eventRouter::registerHandler( %theRouter, %eventName , %handler )
- 1.2.12 eventRouter::registerHandlerMethod( %theRouter, %eventName , %handler , %obj )
- 1.2.13 eventRouter::registerChainedEvent( %theRouter, %eventName , %chainedEventName )
- 1.2.14 eventRouter::unregisterHandler( %theRouter, %eventName , %handler )
- 1.2.15 eventRouter::unregisterMethodHandler( %theRouter, %eventName , %handlerMethod , %obj )
- 1.2.16 eventRouter::unregisterDeadObjects( %theRouter )
- 1.2.17 eventRouter::unregisterObject( %theRouter, %obj )
- 1.2.18 postEvent( %eventName , %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 )
- 1.2.19 eventRouter::postEvent( %theRouter, %eventName , %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 )
- 1.2.20 eventRouter::fireChainedEvents( %theRouter, %eventName , %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10 )
- 1.2.21 getCurrentlyProcessingEvent()
- 1.2.22 isEventProcessing( %eventName )
|
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