Public Member Functions

wosh::Response Class Reference

Responses are related to Requests. Almost all Requests are replied with a wosh::Response Object It holds the reference method and a generic Data as content. More...

#include <H:/WOSH/win32_vc2010/src/core/Response.h>

List of all members.

Public Member Functions

 Response ()
 Empty constructor.
 Response (const std::string &method, ISerializable *data=NULL, WRESULT ReturnValue=WRET_OK)
 Constructor with initializer(s), provided for convenience.
 Response (const Response &m)
 Copy constructor.
virtual ~Response ()
 Free request when allocated.
Getters
const std::string & getMethod () const
 Get the method (name) associated with the request.
WRESULT getReturnValue () const
 Get the return value associated with the response.
bool hasRequest () const
const RequestgetRequest () const
RequestgetRequest ()
virtual MessageContent::TYPE getType () const
 Get MessageContent::TYPE of this implementation: a RESPONSE.
Setters
void setMethod (const std::string &value)
 Set the method (name) associated with the request.
void setReturnValue (WRESULT value)
 Set the return value associated with the response.
virtual void setRequest (Request *request)
Operators Overloading
virtual Responseoperator= (const Response &m)
virtual bool operator== (const Response &other) const
virtual bool operator!= (const Response &other) const
Serialization interface
virtual long compare (const wosh::IComparable *filter, long options) const
 Compare object against another of same type.

Protected Member Functions

Internal methods
virtual void clear ()

Protected Attributes

Internal vars
WRESULT returnValue
 the return value associated with the response
Requestrequest

Detailed Description

Responses are related to Requests. Almost all Requests are replied with a wosh::Response Object It holds the reference method and a generic Data as content.

Version:
0.8.499
Id:
Response.h 3775 2011-01-01 16:38:17Z alex
Author:
Alessandro Polo

Definition at line 49 of file Response.h.


Constructor & Destructor Documentation

wosh::Response::Response (  )

Empty constructor.

Definition at line 49 of file Response.cpp.

wosh::Response::Response ( const std::string &  method,
ISerializable data = NULL,
WRESULT  ReturnValue = WRET_OK 
) [explicit]

Constructor with initializer(s), provided for convenience.

Parameters:
[in]methodthe method name to be executed
[in]ReturnValuethe returned value of the call
[in]datathe data object (ISerializable abstraction) associated with the response. May be NULL.

Definition at line 52 of file Response.cpp.

wosh::Response::Response ( const Response m )

Copy constructor.

Parameters:
m[in] the source object to be copied

Definition at line 55 of file Response.cpp.

References returnValue.

wosh::Response::~Response (  ) [virtual]

Free request when allocated.

Definition at line 61 of file Response.cpp.


Member Function Documentation

long wosh::Response::compare ( const wosh::IComparable filter,
long  option_mask 
) const [virtual]

Compare object against another of same type.

Parameters:
filter[in] the object to be compared
option_mask[in] flags of the comparison, OR of enum COMPARISON_OPTIONS
Returns:
when object are identical return 0; return -1 when object are of different types
See also:
WOSH_COMPARE_RTTI

Implements wosh::IComparable.

Definition at line 83 of file Response.cpp.

References returnValue.

const std::string& wosh::Response::getMethod (  ) const [inline]
WRESULT wosh::Response::getReturnValue (  ) const [inline]
virtual MessageContent::TYPE wosh::Response::getType (  ) const [inline, virtual]

Get MessageContent::TYPE of this implementation: a RESPONSE.

Returns:
returns MessageContent::RESPONSE

Implements wosh::MessageContent.

Definition at line 102 of file Response.h.

void wosh::Response::setMethod ( const std::string &  value ) [inline]

Set the method (name) associated with the request.

Parameters:
[in]valuethe method string to be assigned
See also:
setContentContext()

Definition at line 114 of file Response.h.

void wosh::Response::setReturnValue ( WRESULT  value ) [inline]

Set the return value associated with the response.

Parameters:
[in]valuethe return value associated with the response

Definition at line 120 of file Response.h.

References returnValue.


Member Data Documentation

the return value associated with the response

Definition at line 150 of file Response.h.

Referenced by compare(), getReturnValue(), Response(), and setReturnValue().


The documentation for this class was generated from the following files:

Generated on Tue Feb 8 2011 09:33:31 for WOSH system 0.8.888 [wolf] by Alessandro Polo, using DoxyGen 1.7.2 hosted by WOSH Framework