Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::detail::callback_functor< Signature > Class Template Reference

#include <api_connection.hpp>

Public Types

typedef std::function< Signature >::result_type result_type
 

Public Member Functions

 callback_functor (std::weak_ptr< fc::api_connection > con, uint64_t id)
 
template<typename... Args>
result_type operator() (Args... args) const
 
 callback_functor (std::weak_ptr< fc::binary_api_connection > con, uint64_t id)
 
template<typename... Args>
result_type operator() (Args... args) const
 

Detailed Description

template<typename Signature>
class fc::detail::callback_functor< Signature >

Definition at line 17 of file binary_api_connection.hpp.

Member Typedef Documentation

◆ result_type

template<typename Signature >
typedef std::function< Signature >::result_type fc::detail::callback_functor< Signature >::result_type

Definition at line 19 of file api_connection.hpp.

Constructor & Destructor Documentation

◆ callback_functor() [1/2]

template<typename Signature >
fc::detail::callback_functor< Signature >::callback_functor ( std::weak_ptr< fc::api_connection > con,
uint64_t id )
inline

Definition at line 21 of file api_connection.hpp.

22 :_callback_id(id),_api_connection(con){}

◆ callback_functor() [2/2]

template<typename Signature >
fc::detail::callback_functor< Signature >::callback_functor ( std::weak_ptr< fc::binary_api_connection > con,
uint64_t id )
inline

Definition at line 22 of file binary_api_connection.hpp.

23 :_callback_id(id),_binary_api_connection(con){}

Member Function Documentation

◆ operator()() [1/2]

template<typename Signature >
template<typename... Args>
callback_functor< Signature >::result_type fc::detail::callback_functor< Signature >::operator() ( Args... args) const

TODO------------->>> pack args...

Definition at line 482 of file api_connection.hpp.

483 {
484 std::shared_ptr< fc::api_connection > locked = _api_connection.lock();
485 // TODO: make new exception type for this instead of recycling eof_exception
486 if( !locked )
487 throw fc::eof_exception();
488 locked->send_callback( _callback_id, fc::variants{ args... } ).template as< result_type >();
489 }
std::vector< fc::variant > variants
Definition variant.hpp:173

◆ operator()() [2/2]

template<typename Signature >
template<typename... Args>
result_type fc::detail::callback_functor< Signature >::operator() ( Args... args) const

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