MessageContent Class Reference

Describes the content of a message send from one client to another. More...

#include <messagecontent.h>

Inheritance diagram for MessageContent:

BaseMessage List of all members.

Public Member Functions

 MessageContent (const int iTo=0, const int iFrom=0)
 Constructor.
 MessageContent (const int iTo, const int iFrom, const std::string &sContent)
 Full Constructor.
 ~MessageContent ()
 Destructor.
void toXML (XMLWriter &writer) const
 Write a BaseMessage XML representation.
void processMessage () const
 Process message instructions.
void setTo (const int iTo)
 Sets the Message receiver ID.
void setFrom (const int iFrom)
 Sets the Message sender ID.
int getFrom () const
 Returns the Message sender ID.
int getTo () const
 Returns the Message receiver ID.
std::string getContent () const
 Returns the Message content.
void setContent (const std::string &content)
 Sets the Message content.
std::string toString () const
 Returns a BaseMessage string represention.
MessageContentcopy () const
 Returns a copy of this message.
bool isMessageCrypted () const
 Returns whether the message is crypted.
void setIsMessageCrypted (const bool bCrypted)
 Sets whether the message is crypted.

Static Public Attributes

static const char * CRYPT_ATT = "isCrypted"

Protected Attributes

std::string m_sContent
 Message content.
int m_iFrom
 Message sender ID.
int m_iTo
 Message receiver ID.
bool m_bIsCrypted
 true if message is crypted; false otherwise.

Detailed Description

Describes the content of a message send from one client to another.

Author:
Sylvain Archenault,sylvain.archenault@laposte.net, Yves Houpert <yves.houpert@insa-rouen.fr>


Constructor & Destructor Documentation

MessageContent::MessageContent const int  iTo = 0,
const int  iFrom = 0
 

Constructor.

Parameters:
iTo Message receiver ID.
iFrom Message sender ID.

MessageContent::MessageContent const int  iTo,
const int  iFrom,
const std::string &  sContent
 

Full Constructor.

Parameters:
iTo Message receiver ID.
iFrom Message sender ID.
sContent Message content.


Member Function Documentation

MessageContent & MessageContent::copy  )  const [virtual]
 

Returns a copy of this message.

Returns:
Copy of the message.

Implements BaseMessage.

std::string MessageContent::getContent  )  const [inline]
 

Returns the Message content.

Returns:
Message content.

int MessageContent::getFrom  )  const [inline]
 

Returns the Message sender ID.

Returns:
Message sender ID.

int MessageContent::getTo  )  const [inline]
 

Returns the Message receiver ID.

Returns:
Message receiver ID.

bool MessageContent::isMessageCrypted  )  const [inline]
 

Returns whether the message is crypted.

Returns:
true if message is crypted; false otherwise.

void MessageContent::setContent const std::string &  content  )  [inline]
 

Sets the Message content.

Parameters:
content Message content.

void MessageContent::setFrom const int  iFrom  )  [inline]
 

Sets the Message sender ID.

Parameters:
iFrom Message sender ID.

void MessageContent::setIsMessageCrypted const bool  bCrypted  )  [inline]
 

Sets whether the message is crypted.

Parameters:
bCrypted true if message is crypted; false otherwise.

void MessageContent::setTo const int  iTo  )  [inline]
 

Sets the Message receiver ID.

Parameters:
iTo Message receiver ID.

std::string MessageContent::toString  )  const [virtual]
 

Returns a BaseMessage string represention.

Returns:
BaseMessage String representation.

Implements BaseMessage.

void MessageContent::toXML XMLWriter writer  )  const [virtual]
 

Write a BaseMessage XML representation.

Parameters:
writer XMLWriter object used to writer XML representation.

Implements BaseMessage.


Member Data Documentation

const char * MessageContent::CRYPT_ATT = "isCrypted" [static]
 

Crypt attribute name.


The documentation for this class was generated from the following files:
Generated on Fri May 19 12:15:55 2006 for Bamboo Ch@t by  doxygen 1.4.6