C#Code
C#Code
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
Libraries.Messaging.BaseMessageHandler Class Reference
Inheritance diagram for Libraries.Messaging.BaseMessageHandler:
Libraries.BaseObject Libraries.Messaging.ControllerInputMessageHandler Libraries.Messaging.KeyboardInputMessageHandler Libraries.Messaging.KeyboardInputMessageHandler Libraries.Messaging.MouseInputMessageHandler Libraries.Messaging.MouseInputMessageHandler TheForum.GameCode.MessageSystems.SpecialEventMessageHandler TheForum.GameCode.MessageSystems.SpecialEventMessageHandler

List of all members.

Classes

class  MessageRegistration

Public Member Functions

 BaseMessageHandler ()
override void Update (int frames)
virtual void AddMessage (BaseMessage message)
virtual void RegisterObject (HandleMessageDelegate obj)
virtual void RegisterObject (HandleMessageDelegate obj, bool ignoreIfPaused)
virtual void RegisterObject (HandleMessageDelegate obj, StringType groupID)
virtual void RegisterObject (HandleMessageDelegate obj, StringType groupID, bool ignoreIfPaused)
virtual void Unregister (HandleMessageDelegate obj)
virtual void UnregisterGroup (StringType groupID)
virtual void UnregisterForAllObjects ()
void SetPauseCheck (IsPausedDelegate pauseCheck)
 BaseMessageHandler ()
virtual void Update (int frames)
virtual void AddMessage (BaseMessage message)
virtual void RegisterObject (HandleMessageDelegate obj)
virtual void Unregister (HandleMessageDelegate obj)
virtual void UnregisterForAllObjects ()

Protected Member Functions

virtual void Process ()
virtual void Process ()

Protected Attributes

List< BaseMessagem_messages
 Stores all the messages in the manager.
List< MessageRegistrationm_registrations
 All delegates set to receive messages.
IsPausedDelegate m_isPausedDelegate
 Delegate to run to see if the game is paused.
List< HandleMessageDelegate > m_registrations
 All delegates set to receive messages.

Private Member Functions

 ~BaseMessageHandler ()
 ~BaseMessageHandler ()

Detailed Description

A base message handling class. Objects register themselves with the object. When messages are processed, each object is notified. Messags are stored in a queue.


Constructor & Destructor Documentation

Libraries.Messaging.BaseMessageHandler.BaseMessageHandler ( )

Default constructor.

Libraries.Messaging.BaseMessageHandler.~BaseMessageHandler ( ) [private]

Destructor.

Libraries.Messaging.BaseMessageHandler.BaseMessageHandler ( )

Default constructor.

Libraries.Messaging.BaseMessageHandler.~BaseMessageHandler ( ) [private]

Destructor.


Member Function Documentation

virtual void Libraries.Messaging.BaseMessageHandler.AddMessage ( BaseMessage  message) [virtual]

Adds the given message into the handler.

virtual void Libraries.Messaging.BaseMessageHandler.AddMessage ( BaseMessage  message) [virtual]

Adds the given message into the handler.

virtual void Libraries.Messaging.BaseMessageHandler.Process ( ) [protected, virtual]

Run through the messages, notifying the registered objects.

virtual void Libraries.Messaging.BaseMessageHandler.Process ( ) [protected, virtual]

Run through the messages, notifying the registered objects.

virtual void Libraries.Messaging.BaseMessageHandler.RegisterObject ( HandleMessageDelegate  obj,
bool  ignoreIfPaused 
) [virtual]

Register the given object to receive messages from the manager. If the object is already registered it is not registerd again. The object can be registered to ignore input if the game is paused and the manger is set to check for pausing.

ignoreIfPaused - True if the registered object should be ignored if the game is paused, false if not.
virtual void Libraries.Messaging.BaseMessageHandler.RegisterObject ( HandleMessageDelegate  obj,
StringType  groupID 
) [virtual]

Register the given object to receive messages from the manager. If the object is already registered it is not registerd again. Default is to not handle input if the manager thinks the game is paused.

obj - Delegate to register.
groupID - ID of the group to associate the registration with. null is the default group.
virtual void Libraries.Messaging.BaseMessageHandler.RegisterObject ( HandleMessageDelegate  obj) [virtual]

Register the given object to receive messages from the manager. If the object is already registered it is not registered again. Default is to not handle input if the manager thinks the game is paused.

virtual void Libraries.Messaging.BaseMessageHandler.RegisterObject ( HandleMessageDelegate  obj,
StringType  groupID,
bool  ignoreIfPaused 
) [virtual]

Register the given object to receive messages from the manager. If the object is already registered it is not registerd again.

obj - Delegate to register.
groupID - ID of the group to associate the registration with. null is the default group.
ignoreIfPaused - True if the registered object should be ignored if the game is paused, false if not.
virtual void Libraries.Messaging.BaseMessageHandler.RegisterObject ( HandleMessageDelegate  obj) [virtual]

Register the given object to receive messages from the manager. If the object is already registered it is not registerd again.

void Libraries.Messaging.BaseMessageHandler.SetPauseCheck ( IsPausedDelegate  pauseCheck)

Set the delegate to use for checking the the game is paused.

pauseCheck - Value is the delegate to run to see if the game is paused, null if you don't want it to check.
virtual void Libraries.Messaging.BaseMessageHandler.Unregister ( HandleMessageDelegate  obj) [virtual]

Unregister the given object. If it isn't registered, nothing happens.

virtual void Libraries.Messaging.BaseMessageHandler.Unregister ( HandleMessageDelegate  obj) [virtual]

Unregister the given object. If it isn't registered, nothing happens.

virtual void Libraries.Messaging.BaseMessageHandler.UnregisterForAllObjects ( ) [virtual]

Unregister all objects registered to receive messages. That doesn't include the individual event registrations.

virtual void Libraries.Messaging.BaseMessageHandler.UnregisterForAllObjects ( ) [virtual]

Unregister all objects registered to recived messages. That doesn't include the individual event registrations.

virtual void Libraries.Messaging.BaseMessageHandler.UnregisterGroup ( StringType  groupID) [virtual]

Unregister all registrations for the given group.

groupID - ID of the group to unregister all registrations for.
virtual void Libraries.Messaging.BaseMessageHandler.Update ( int  frames) [virtual]
override void Libraries.Messaging.BaseMessageHandler.Update ( int  frames) [virtual]

Member Data Documentation

Delegate to run to see if the game is paused.

Stores all the messages in the manager.

List<HandleMessageDelegate> Libraries.Messaging.BaseMessageHandler.m_registrations [protected]

All delegates set to receive messages.

All delegates set to receive messages.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Properties