rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
rad::cii::Request< REP_TYPE, REQ_TYPE > Class Template Reference

#include <request.hpp>

Public Member Functions

 Request (const REQ_TYPE &req_payload)
 
 Request (const Request &r)=default
 
Requestoperator= (const Request &r)=default
 
const REQ_TYPE & GetRequestPayload () const
 
elt::mal::future< REP_TYPE > GetReplyFuture () const
 
void SetReplyValue (const REP_TYPE &reply) const
 
template<class T >
void SetException (const T &e) const
 
 Request (const REQ_TYPE &req_payload)
 
 Request (const Request &r)=default
 
Requestoperator= (const Request &r)=default
 
const REQ_TYPE & GetRequestPayload () const
 
elt::mal::future< REP_TYPE > GetReplyFuture () const
 
void SetReplyValue (const REP_TYPE &reply) const
 
template<class T >
void SetException (const T &e) const
 
 Request (const REQ_TYPE &req_payload)
 
 Request (const Request &r)=default
 
Requestoperator= (const Request &r)=default
 
const REQ_TYPE & GetRequestPayload () const
 
elt::mal::future< REP_TYPE > GetReplyFuture () const
 
void SetReplyValue (const REP_TYPE &reply) const
 
template<class T >
void SetException (const T &e) const
 

Detailed Description

template<typename REP_TYPE, typename REQ_TYPE = void>
class rad::cii::Request< REP_TYPE, REQ_TYPE >

This class contains a copy of the payload of a MAL request and allows to send a MAL reply.

Template Parameters
REP_TYPEType of the reply's payload.
REQ_TYPEType of the request's payload (default is 'void').

Constructor & Destructor Documentation

template<typename REP_TYPE, typename REQ_TYPE = void>
rad::cii::Request< REP_TYPE, REQ_TYPE >::Request ( const REQ_TYPE &  req_payload)
inlineexplicit

This constructor copies the payload associated to a MAL request and creates a promise for the MAL reply.

Parameters
req_payloadPayload associated to the MAL request.
Template Parameters
REQ_TYPEType of the payload associated to the MAL request.
template<typename REP_TYPE, typename REQ_TYPE = void>
rad::cii::Request< REP_TYPE, REQ_TYPE >::Request ( const Request< REP_TYPE, REQ_TYPE > &  r)
default

Default copy constructor.

template<typename REP_TYPE, typename REQ_TYPE = void>
rad::cii::Request< REP_TYPE, REQ_TYPE >::Request ( const REQ_TYPE &  req_payload)
inlineexplicit

This constructor copies the payload associated to a MAL request and creates a promise for the MAL reply.

Parameters
req_payloadPayload associated to the MAL request.
Template Parameters
REQ_TYPEType of the payload associated to the MAL request.
template<typename REP_TYPE, typename REQ_TYPE = void>
rad::cii::Request< REP_TYPE, REQ_TYPE >::Request ( const Request< REP_TYPE, REQ_TYPE > &  r)
default

Default copy constructor.

template<typename REP_TYPE, typename REQ_TYPE = void>
rad::cii::Request< REP_TYPE, REQ_TYPE >::Request ( const REQ_TYPE &  req_payload)
inlineexplicit

This constructor copies the payload associated to a MAL request and creates a promise for the MAL reply.

Parameters
req_payloadPayload associated to the MAL request.
Template Parameters
REQ_TYPEType of the payload associated to the MAL request.
template<typename REP_TYPE, typename REQ_TYPE = void>
rad::cii::Request< REP_TYPE, REQ_TYPE >::Request ( const Request< REP_TYPE, REQ_TYPE > &  r)
default

Default copy constructor.

Member Function Documentation

template<typename REP_TYPE, typename REQ_TYPE = void>
elt::mal::future<REP_TYPE> rad::cii::Request< REP_TYPE, REQ_TYPE >::GetReplyFuture ( ) const
inline

This method can be used to get the 'future' indicating when a reply is ready to be sent.

Returns
A future associated to the reply.
template<typename REP_TYPE, typename REQ_TYPE = void>
elt::mal::future<REP_TYPE> rad::cii::Request< REP_TYPE, REQ_TYPE >::GetReplyFuture ( ) const
inline

This method can be used to get the 'future' indicating when a reply is ready to be sent.

Returns
A future associated to the reply.
template<typename REP_TYPE, typename REQ_TYPE = void>
elt::mal::future<REP_TYPE> rad::cii::Request< REP_TYPE, REQ_TYPE >::GetReplyFuture ( ) const
inline

This method can be used to get the 'future' indicating when a reply is ready to be sent.

Returns
A future associated to the reply.
template<typename REP_TYPE, typename REQ_TYPE = void>
const REQ_TYPE& rad::cii::Request< REP_TYPE, REQ_TYPE >::GetRequestPayload ( ) const
inline

This method can be used to retrieve the payload associated to the received MAL request.

Returns
The payload associated to the MAL request.
template<typename REP_TYPE, typename REQ_TYPE = void>
const REQ_TYPE& rad::cii::Request< REP_TYPE, REQ_TYPE >::GetRequestPayload ( ) const
inline

This method can be used to retrieve the payload associated to the received MAL request.

Returns
The payload associated to the MAL request.
template<typename REP_TYPE, typename REQ_TYPE = void>
const REQ_TYPE& rad::cii::Request< REP_TYPE, REQ_TYPE >::GetRequestPayload ( ) const
inline

This method can be used to retrieve the payload associated to the received MAL request.

Returns
The payload associated to the MAL request.
template<typename REP_TYPE, typename REQ_TYPE = void>
Request& rad::cii::Request< REP_TYPE, REQ_TYPE >::operator= ( const Request< REP_TYPE, REQ_TYPE > &  r)
default

Default assignment operator.

template<typename REP_TYPE, typename REQ_TYPE = void>
Request& rad::cii::Request< REP_TYPE, REQ_TYPE >::operator= ( const Request< REP_TYPE, REQ_TYPE > &  r)
default

Default assignment operator.

template<typename REP_TYPE, typename REQ_TYPE = void>
Request& rad::cii::Request< REP_TYPE, REQ_TYPE >::operator= ( const Request< REP_TYPE, REQ_TYPE > &  r)
default

Default assignment operator.

template<typename REP_TYPE, typename REQ_TYPE = void>
template<class T >
void rad::cii::Request< REP_TYPE, REQ_TYPE >::SetException ( const T &  e) const
inline

This method allows to set an error reply.

Template Parameters
TType of exception.
Parameters
eException containing error description.
template<typename REP_TYPE, typename REQ_TYPE = void>
template<class T >
void rad::cii::Request< REP_TYPE, REQ_TYPE >::SetException ( const T &  e) const
inline

This method allows to set an error reply.

Template Parameters
TType of exception.
Parameters
eException containing error description.
template<typename REP_TYPE, typename REQ_TYPE = void>
template<class T >
void rad::cii::Request< REP_TYPE, REQ_TYPE >::SetException ( const T &  e) const
inline

This method allows to set an error reply.

Template Parameters
TType of exception.
Parameters
eException containing error description.
template<typename REP_TYPE, typename REQ_TYPE = void>
void rad::cii::Request< REP_TYPE, REQ_TYPE >::SetReplyValue ( const REP_TYPE &  reply) const
inline

This method allows to set the payload for the OK reply.

Parameters
replyPayload of the reply.
template<typename REP_TYPE, typename REQ_TYPE = void>
void rad::cii::Request< REP_TYPE, REQ_TYPE >::SetReplyValue ( const REP_TYPE &  reply) const
inline

This method allows to set the payload for the OK reply.

Parameters
replyPayload of the reply.
template<typename REP_TYPE, typename REQ_TYPE = void>
void rad::cii::Request< REP_TYPE, REQ_TYPE >::SetReplyValue ( const REP_TYPE &  reply) const
inline

This method allows to set the payload for the OK reply.

Parameters
replyPayload of the reply.

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