Torque 3D - Script Manual: Messaging

TorqueScript

Main   Class List   Namespace List   Online

Messaging
[Console]

Script classes and functions used for passing messages and events between classes. More...

Classes

class  EventManager
 The EventManager class is a wrapper for the standard messaging system. More...
class  Message
 Base class for messages. More...
class  MessageForwarder
 Forward messages from one queue to another. More...
class  ScriptMsgListener
 Script accessible version of Dispatcher::IMessageListener. Often used in conjunction with EventManager. More...

Functions

bool dispatchMessage (string queueName, string message, string data)
 Dispatch a message to a queue.
bool dispatchMessageObject (string queueName, string message)
 Dispatch a message object to a queue.
bool isQueueRegistered (string queueName)
 Determines if a dispatcher queue exists.
bool registerMessageListener (string queueName, string listener)
 Registers an event message.
void registerMessageQueue (string queueName)
 Registeres a dispatcher queue.
void unregisterMessageListener (string queueName, string listener)
 Unregisters an event message.
void unregisterMessageQueue (string queueName)
 Unregisters a dispatcher queue.

Detailed Description

Script classes and functions used for passing messages and events between classes.


Function Documentation

bool dispatchMessage ( string  queueName,
string  message,
string  data 
)

Dispatch a message to a queue.

Parameters:
queueName Queue to dispatch the message to
message Message to dispatch
data Data for message
Returns:
True for success, false for failure
See also:
dispatchMessageObject
bool dispatchMessageObject ( string  queueName,
string  message 
)

Dispatch a message object to a queue.

Parameters:
queueName Queue to dispatch the message to
message Message to dispatch
Returns:
true for success, false for failure
See also:
dispatchMessage
bool isQueueRegistered ( string  queueName  ) 

Determines if a dispatcher queue exists.

Parameters:
queueName String containing the name of queue
bool registerMessageListener ( string  queueName,
string  listener 
)

Registers an event message.

Parameters:
queueName String containing the name of queue to attach listener to
listener Name of event messenger
void registerMessageQueue ( string  queueName  ) 

Registeres a dispatcher queue.

Parameters:
queueName String containing the name of queue
void unregisterMessageListener ( string  queueName,
string  listener 
)

Unregisters an event message.

Parameters:
queueName String containing the name of queue
listener Name of event messenger
void unregisterMessageQueue ( string  queueName  ) 

Unregisters a dispatcher queue.

Parameters:
queueName String containing the name of queue


Copyright © GarageGames, LLC. All Rights Reserved.