C4 Engine Terathon Software C4 Engine API Documentation

• Message Manager

API Links
Developer Links

class ControllerMessage

Defined in:  C4Messages.h
Base class for all controller message types.
Definition

class ControllerMessage : public Message, public ListElement<ControllerMessage>

Member Functions
ControllerMessage::GetControllerMessageType Returns the dynamic type identifier of a controller message.
ControllerMessage::GetControllerIndex Returns the World Manager controller index corresponding to a controller message.
ControllerMessage::OverridesMessage Returns a boolean value indicating whether a message overrides a previous message in the journal.
Constructor

ControllerMessage(ControllerMessageType type, long index);

Parameters
type The type of controller message.
index The World Manager controller index for this message. For a particular controller, this index can be retrieved using the Controller::GetControllerIndex function.
Description
Controller messages are sent directly to Controller objects in order to synchronize the state or motion of the scene graph nodes that they control. A ControllerMessage object may contain no information beyond its type and controller index, or it may be subclassed so that extra data may be added to it. The application module on the server machine typically constructs a controller message when it needs to inform client machines about a change in state for a particular controller and then calls either the MessageMgr::SendMessageAll function or the MessageMgr::SendMessageJournal function to distribute the message. The controller index given by the index parameter identifies the particular controller object that will receive the message on each machine. On the receiving machines, the Controller::ReceiveMessage function is called to process the controller message.
Base Classes
Message All message types are subclasses of Message.
ListElement<ControllerMessage> Used internally by the Message Manager.
See Also
Controller::GetControllerIndex

Controller::ConstructMessage

Controller::ReceiveMessage