#include <connection.hpp>
Classes | |
struct | add_interface_visitor |
struct | rpc_recv_functor |
Public Types | |
typedef boost::shared_ptr < connection > | ptr |
typedef IODelegate | io_delegate_type |
Public Member Functions | |
template<typename R , typename ParamSeq > | |
cmt::future< R > | call_fused (const std::string &id, ParamSeq &¶ms) |
template<typename ParamSeq > | |
void | notice_fused (const std::string &id, ParamSeq &¶ms) |
template<typename R , typename ParamSeq > | |
cmt::future< R > | call_fused (std::string &&id, ParamSeq &¶ms) |
template<typename ParamSeq > | |
void | notice_fused (std::string &&id, ParamSeq &¶ms) |
template<typename Signature > | |
std::string | add_method (const boost::function< Signature > &m) |
template<typename Signature > | |
boost::function< Signature > | create_callback (const std::string &name) |
Public Attributes | |
boost::signal< void()> | closed |
Protected Member Functions | |
connection (detail::connection_base *b) |
IODelegate | must implement the following expressions |
datavec IODelegate::pack<T> ( Filter&, const T& ) size_t IODelegate::packsize<T>( Filter&, const T& ) R IODelegate::unpack<R> ( Filter&, const datavec& )
Filter | must implement the following expressions template<typename T,typename R> R operator()( const T& v ) -> returns the data to pack in place of v |
template<typename T, typename R> void operator()( R& r, T& v ) -> given r, assign to v.
template<typename T> const bool is_filtered(const T*)const { return false; }
template<typename Signature> const bool is_filtered(const boost::function<Signature>*)const { return true; }
unpack( Filter& f, Stream& s, T& v ) { if( f.is_filtered(&v) ) { // optimizing compiler should reduce this to 1 use case. boost::remove_reference<decltype(f(T()))>::type r; unpack(f,s,r) f( r, v ); } else { // do your thing... } }
Definition at line 48 of file connection.hpp.
std::string mace::rpc::connection< IODelegate >::add_method | ( | const boost::function< Signature > & | m | ) | [inline] |
Adds a new 'anonymous' method and returns the name generated for it.
Definition at line 88 of file connection.hpp.
boost::function<Signature> mace::rpc::connection< IODelegate >::create_callback | ( | const std::string & | name | ) | [inline] |
Definition at line 97 of file connection.hpp.