#include <message.h>

Public Member Functions | |
| Message () | |
| virtual void | ToString (std::string &toFill) const |
| This should write all of the subclass specific data to the string . | |
| virtual void | FromString (const std::string &source) |
| This should read all of the subclass specific data from the string. | |
| virtual void | ToDataStream (dtUtil::DataStream &stream) const |
| This should write all of the subclass specific data to the stream. | |
| virtual void | FromDataStream (dtUtil::DataStream &stream) |
| This should read all of the subclass specific data from the stream. | |
| MessageParameter * | GetParameter (const std::string &name) |
| Non-const version of getter to return a message parameter by name. | |
| const MessageParameter * | GetParameter (const std::string &name) const |
| Const version of getter to return a message parameter by name. | |
| const MessageType & | GetMessageType () const |
| This getter, not the class of the object, determines what type the message is. | |
| void | SetSendingActorId (const dtCore::UniqueId &newId) |
| Assigns the unique id of the actor sending the message. | |
| void | SetAboutActorId (const dtCore::UniqueId &newId) |
| Assigns the unique id of the actor the message is about or to. | |
| const dtCore::UniqueId & | GetSendingActorId () const |
| |
| const dtCore::UniqueId & | GetAboutActorId () const |
| |
| const MachineInfo & | GetSource () const |
| |
| const MachineInfo * | GetDestination () const |
| |
| void | SetSource (const MachineInfo &mi) |
| Reassigns the Source. | |
| void | SetDestination (const MachineInfo *mi) |
| Reassigns the destination. | |
| virtual void | CopyDataTo (Message &msg) const |
| Copys the data contents of this message to the passed in message. | |
| void | SetCausingMessage (const Message *causingMessage) |
| Assigns the message that caused this message. | |
| const Message * | GetCausingMessage () const |
| This is used for replies, errors, and rejection messages. | |
| bool | operator== (const Message &toCompare) const |
| bool | operator!= (const Message &toCompare) const |
Protected Member Functions | |
| void | AddParameter (MessageParameter *param) |
| Adds a parameter to this message. | |
| virtual | ~Message () |
Friends | |
| class | MessageFactory |
| dtGame::Message::Message | ( | ) |
| virtual dtGame::Message::~Message | ( | ) | [inline, protected, virtual] |
| void dtGame::Message::ToString | ( | std::string & | toFill | ) | const [virtual] |
This should write all of the subclass specific data to the string .
The base class data will be read by the caller before it calls this method.
| toFill | the string to fill. |
| void dtGame::Message::FromString | ( | const std::string & | source | ) | [virtual] |
This should read all of the subclass specific data from the string.
By default, it reads all of the message parameters. The base class data will be set by the caller when it creates the object.
| source | the string to pull the data from. |
Reimplemented in dtGame::LogGetKeyframeListMessage, and dtGame::LogGetTagListMessage.
| void dtGame::Message::ToDataStream | ( | dtUtil::DataStream & | stream | ) | const [virtual] |
This should write all of the subclass specific data to the stream.
The base class data will be read by the caller before it calls this method.
| stream | the stream to fill. |
| void dtGame::Message::FromDataStream | ( | dtUtil::DataStream & | stream | ) | [virtual] |
This should read all of the subclass specific data from the stream.
By default, it reads all of the message parameters. The base class data will be set by the caller when it creates the object.
| stream | the stream to pull the data from. |
Reimplemented in dtGame::LogGetKeyframeListMessage, and dtGame::LogGetTagListMessage.
| MessageParameter * dtGame::Message::GetParameter | ( | const std::string & | name | ) |
Non-const version of getter to return a message parameter by name.
| name | The name of the message parameter to return. |
| const MessageParameter * dtGame::Message::GetParameter | ( | const std::string & | name | ) | const |
Const version of getter to return a message parameter by name.
| name | The name of the message parameter to return. |
| const MessageType& dtGame::Message::GetMessageType | ( | ) | const [inline] |
This getter, not the class of the object, determines what type the message is.
| void dtGame::Message::SetSendingActorId | ( | const dtCore::UniqueId & | newId | ) | [inline] |
Assigns the unique id of the actor sending the message.
This should not be set if the message is sent by the GM or a component. It's intended for actor to actor messages.
| newId | the new id of the sending actor. |
| void dtGame::Message::SetAboutActorId | ( | const dtCore::UniqueId & | newId | ) | [inline] |
Assigns the unique id of the actor the message is about or to.
This should not be set if the message is not about an specific actor.
| newId | the new id of the actor this message is about or to. |
| const dtCore::UniqueId& dtGame::Message::GetSendingActorId | ( | ) | const [inline] |
This may be an empty unique id, which means there was no sending actor.
| const dtCore::UniqueId& dtGame::Message::GetAboutActorId | ( | ) | const [inline] |
If they do this, any message of that type with the about actor set to the id of the actor is send to it.
| const MachineInfo& dtGame::Message::GetSource | ( | ) | const [inline] |
| const MachineInfo* dtGame::Message::GetDestination | ( | ) | const [inline] |
| void dtGame::Message::SetSource | ( | const MachineInfo & | mi | ) | [inline] |
Reassigns the Source.
| the | machine info to assign as the source. It is a reference so that it may not be NULL. |
| void dtGame::Message::SetDestination | ( | const MachineInfo * | mi | ) | [inline] |
Reassigns the destination.
| the | machine info to assign as the destination. It is a pointer so that it may be NULL. |
| void dtGame::Message::CopyDataTo | ( | Message & | msg | ) | const [virtual] |
Copys the data contents of this message to the passed in message.
The param must be of the same type for this to work properly.
| msg | the message to copy the contents to. |
| dtUtil::Exception | with enum Exception::INVALID_PARAMETER if the message passed cannot by copied to. |
| void dtGame::Message::SetCausingMessage | ( | const Message * | causingMessage | ) | [inline] |
Assigns the message that caused this message.
This is used for replies, errors, and rejection messages.
| causingMessage | the message that caused this message to be send. |
| const Message* dtGame::Message::GetCausingMessage | ( | ) | const [inline] |
This is used for replies, errors, and rejection messages.
| bool dtGame::Message::operator== | ( | const Message & | toCompare | ) | const |
| bool dtGame::Message::operator!= | ( | const Message & | toCompare | ) | const [inline] |
| void dtGame::Message::AddParameter | ( | MessageParameter * | param | ) | [protected] |
Adds a parameter to this message.
This method is protected because only a message class should add parameters to itself.
| param | the new parameter to add. |
friend class MessageFactory [friend] |