Answer Class Reference

Base class for all answers. More...

#include <answer.h>

Inheritance diagram for Answer:

BaseMessage AddContactAnswer ConnectionAnswer ContactListAnswer DelContactAnswer List of all members.

Public Member Functions

 Answer (const int iID=0, const bool bValue=false)
 Default constructor.
 Answer (const int iID, const bool bValue, const std::string &sDescription)
 Full constructor.
 ~Answer ()
 Destructor.
void setID (const int iID)
 Sets answer ID.
const int getAnswerID () const
 Returns answer ID.
const bool getValue () const
 Returns answer value.
void setValue (const bool bValue)
 Sets the answer value.
std::string getDescription () const
 Returns answer short description.
void setDescription (const std::string &sDescription)
 Sets the answer short description.
virtual void processMessage () const =0
 Abstract method which process the answer.
void toXML (XMLWriter &) const
 Write a XML representation of this object.
virtual std::string toString () const
 Returns a string representation of the answer.

Static Public Attributes

static const char * ID_ATTR = "id"
 Name of ID attribute.

Detailed Description

Base class for all answers.

Author:
Sylvain Archenault <sylvain.archenault@laposte.net>

Yves Houpert <yves.houpert@insa-rouen.fr>


Constructor & Destructor Documentation

Answer::Answer const int  iID = 0,
const bool  bValue = false
 

Default constructor.

Parameters:
iID Answer ID.
bValue Answer value.

Answer::Answer const int  iID,
const bool  bValue,
const std::string &  sDescription
 

Full constructor.

Parameters:
iID Answer ID.
bValue Answer value.
sDescription Short answer description.


Member Function Documentation

const int Answer::getAnswerID  )  const [inline]
 

Returns answer ID.

Returns:
Answer ID.

std::string Answer::getDescription  )  const [inline]
 

Returns answer short description.

Returns:
Answer short description.

const bool Answer::getValue  )  const [inline]
 

Returns answer value.

Returns:
Answer value.

void Answer::setDescription const std::string &  sDescription  )  [inline]
 

Sets the answer short description.

Parameters:
sDescription Short answer description.

void Answer::setID const int  iID  )  [inline]
 

Sets answer ID.

Parameters:
iID Answer ID.

void Answer::setValue const bool  bValue  )  [inline]
 

Sets the answer value.

Parameters:
bValue Answer value.

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

Returns a string representation of the answer.

Returns:
String representation.

Implements BaseMessage.

Reimplemented in AddContactAnswer, ConnectionAnswer, ContactListAnswer, and DelContactAnswer.

void Answer::toXML XMLWriter  )  const [virtual]
 

Write a XML representation of this object.

Here does nothing, because we nerver have the need to write an answer to the server. Hence, this function is not defined.

Implements BaseMessage.


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