|
QSDK 1.1 Documentation |
#include <Q/gamedev.h>
Inheritance diagram for Q::MessageManager:

Public Types | |
| typedef Com::Ptr< MessageManager > | PTR |
Public Member Functions | |
| virtual Utils::Result | createMessageType (const char *, MessageType **)=0 |
| virtual Utils::Result | send (MessagePeer *from, MessagePeer *to, Message *, MessageResult *result)=0 |
| virtual Utils::Result | send (MessagePeer *from, MessagePeer *to, Message *, MessageResult *, float delay)=0 |
| virtual Utils::Result | add (MessagePeer *receiver, MessagePeer *sender)=0 |
| virtual Utils::Result | add (MessagePeer *receiver, MessagePeer *sender, MessageType *)=0 |
| virtual Utils::Result | add (MessagePeer *receiver, MessagePeer *sender, unsigned int categoryMask)=0 |
| virtual Utils::Result | remove (MessagePeer *, MessagePeer *)=0 |
| virtual Utils::Result | remove (MessagePeer *)=0 |
Static Public Member Functions | |
| PTR | theManager () |
Static Public Attributes | |
| Com::UUID | IID |
| Com::UUID | CLSID |
The MessageManager singleton object is the main platform for messaging. Only one instance of MessageManager is ever created - subsequent attempts to create the manager return the same object as the first time. Its main role is to send and route messages. Messages may be sent to a particular target or broadcasted; they may be anonymous; they may be sent synchronously or asynchronously, with or without a delay. The optional reply can also be synchronous or asynchronous. The manager also connects and disconnects peers. MessagePeer connection is used when messages are broadcasted. Peers must be removed from the manager when they become invalid (i.e. destroyed) so that all the other peers and messaging users get notified. It is particularly useful for scripting to prevent it from sending messages to invalid targets.
|
|
A COM pointer to an object of this class |
|
||||||||||||||||
|
Connect 2 peers for broadcasted messages. The receiver will receive all messages from the sender peer whose type category matches the specified category bit mask |
|
||||||||||||||||
|
Connect 2 peers for broadcasted messages. The receiver will receive all messages whose type is the specified type from the sender peer |
|
||||||||||||
|
Connect 2 peers for broadcasted messages (no filtering). The receiver will receive any messages from the sender peer (no filter). |
|
||||||||||||
|
Returns the MessageType object associated with the specified name if it exists, and creates one if it does not.
|
|
|
Invalidate a peer. This method is essential to notify all messaging users that the peer can no longer be used. For instance, delayed messages will be cancelled and the scripting engine will automatically reset all the variables storing the specified peer. |
|
||||||||||||
|
Disconnect peers |
|
||||||||||||||||||||||||
|
Send a message asynchronously. The message is sent to the specified destination if it is not nil, otherwise it is broadcasted. If a valid result is specified, the sender may expect the destination to return a result by callback
|
|
||||||||||||||||||||
|
Send a message synchronously. The message is sent to the specified destination if it is not nil, otherwise it is broadcasted. If a valid result is specified, the sender may expect the destination to return a result by callback
|
|
|
The singleton MessageManager |
|
|
COM CLSID f2d80091-974f-4a2a-98ee-3f7f4bb7b5cb |
|
|
COM IID 904ed15b-ec42-478a-84a1-1b43ac0d714c Reimplemented from Com::Unknown. |
|
|
|
Qube Software Limited © 2000-2004
|
|