SObjectizer  5.5
Public Member Functions | Private Types | Private Attributes | List of all members
so_5::infinite_wait_service_invoke_proxy_t< Result > Class Template Reference

A special helper class for infinite waiting of service call. More...

#include <mbox.hpp>

Public Member Functions

 infinite_wait_service_invoke_proxy_t (const creator_t &creator)
 
template<class Param >
Result sync_get () const
 Make synchronous service request call. More...
 
template<class Request_Type , class Envelope_Type >
Result sync_get_2 (intrusive_ptr_t< Envelope_Type > msg_ref) const
 Make synchronous service request call with parameter. More...
 
template<class Param >
Result sync_get (intrusive_ptr_t< Param > msg_ref) const
 Make synchronous service request call with parameter. More...
 
template<class Param >
Result sync_get (std::unique_ptr< Param > msg_unique_ptr) const
 Make synchronous service request call with parameter. More...
 
template<class Param >
Result sync_get (Param *msg) const
 Make synchronous service request call with parameter. More...
 
template<class Param , typename... Args>
Result make_sync_get (Args &&... args) const
 Create param and make service request call. More...
 

Private Types

typedef service_invoke_proxy_t< Result > creator_t
 Type of creator of that object. More...
 

Private Attributes

const creator_t m_creator
 

Detailed Description

template<class Result>
class so_5::infinite_wait_service_invoke_proxy_t< Result >

A special helper class for infinite waiting of service call.

Since
v.5.3.0

Member Typedef Documentation

◆ creator_t

template<class Result >
typedef service_invoke_proxy_t< Result > so_5::infinite_wait_service_invoke_proxy_t< Result >::creator_t
private

Type of creator of that object.

Constructor & Destructor Documentation

◆ infinite_wait_service_invoke_proxy_t()

template<class Result >
so_5::infinite_wait_service_invoke_proxy_t< Result >::infinite_wait_service_invoke_proxy_t ( const creator_t creator)

Member Function Documentation

◆ make_sync_get()

template<class Result >
template<class Param , typename... Args>
Result so_5::infinite_wait_service_invoke_proxy_t< Result >::make_sync_get ( Args &&...  args) const

Create param and make service request call.

This method should be used for the case where Param is a message.

Template Parameters
Paramtype of message to be sent to distination.
Argstypes of Param's constructor arguments.
Usage example:
const so_5::mbox_t & dest = ...;
std::string result = dest.get_one< std::string >().wait_forever().make_sync_get< request >(...) );

◆ sync_get() [1/4]

template<class Result >
template<class Param >
Result so_5::infinite_wait_service_invoke_proxy_t< Result >::sync_get ( ) const

Make synchronous service request call.

This method should be used for the case where Param is a signal.

Template Parameters
Paramtype of signal to be sent to distination.
Usage example:
const so_5::mbox_t & dest = ...;
std::string result = dest.get_one< std::string >().wait_forever().sync_get< status_signal >();

◆ sync_get() [2/4]

template<class Result >
template<class Param >
Result so_5::infinite_wait_service_invoke_proxy_t< Result >::sync_get ( intrusive_ptr_t< Param >  msg_ref) const

Make synchronous service request call with parameter.

This method should be used for the case where Param is a message.

Template Parameters
Paramtype of message to be sent to distination.
Usage example:
void some_agent::some_event( mhood_t< request > & req )
{
const so_5::mbox_t & dest = ...;
std::string result = dest.get_one< std::string >().wait_forever().sync_get( req.make_reference() );
}

◆ sync_get() [3/4]

template<class Result >
template<class Param >
Result so_5::infinite_wait_service_invoke_proxy_t< Result >::sync_get ( std::unique_ptr< Param >  msg_unique_ptr) const

Make synchronous service request call with parameter.

This method should be used for the case where Param is a message.

Template Parameters
Paramtype of message to be sent to distination.
Usage example:
const so_5::mbox_t & dest = ...;
std::string result = dest.get_one< std::string >().wait_forever().sync_get( std::make_unique< request >(...) );

◆ sync_get() [4/4]

template<class Result >
template<class Param >
Result so_5::infinite_wait_service_invoke_proxy_t< Result >::sync_get ( Param *  msg) const

Make synchronous service request call with parameter.

This method should be used for the case where Param is a message.

Template Parameters
Paramtype of message to be sent to distination.
Usage example:
const so_5::mbox_t & dest = ...;
std::string result = dest.get_one< std::string >().wait_forever().sync_get( new request(...) );

◆ sync_get_2()

template<class Result >
template<class Request_Type , class Envelope_Type >
Result so_5::infinite_wait_service_invoke_proxy_t< Result >::sync_get_2 ( intrusive_ptr_t< Envelope_Type >  msg_ref) const

Make synchronous service request call with parameter.

This method should be used for the case where Envelope_Type is a message.

Note
This method was added in v.5.5.19 for suppor immutable_msg<T> and mutable_msg<T> message objects.
Attention
This method is not a part of stable SObjectizer's API. Don't use it in your code because it is a subject of changes in the future version of SObjectizer. Use so_5::request_value() or so_5::request_future() instead.
Template Parameters
Request_Typetype to which receiver must be subscribed.
Envelope_Typetype of message object to be sent.
Since
v.5.5.19

Member Data Documentation

◆ m_creator

template<class Result >
const creator_t so_5::infinite_wait_service_invoke_proxy_t< Result >::m_creator
private

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