MIRA
Classes | Namespaces | Macros
RPCServer.h File Reference

Server side implementation of RPC calls. More...

#include <functional>
#include <boost/preprocessor/repetition.hpp>
#include <boost/thread/mutex.hpp>
#include <platform/Environment.h>
#include <serialization/ReflectorInterface.h>
#include <error/LoggingCore.h>
#include <error/LoggingAux.h>
#include <rpc/RPCSignature.h>
#include <rpc/RPCInvoker.h>
#include <rpc/RPCError.h>
#include <rpc/BinaryRPCBackend.h>
#include <rpc/JSONRPCBackend.h>
#include <rpc/AbstractDeferredInvoker.h>
#include <utils/ToString.h>
Include dependency graph for RPCServer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  RPCServer
 The RPCServer is responsible for handling the server-side of an rpc call. More...
 
struct  RPCServer::ParameterInfo
 Contains information on an RPC method's parameter: name, description. More...
 
struct  RPCServer::MethodInfo
 Contains information on an existing RPC method: the signature of the method, comments, etc. More...
 
class  RPCServer::MethodInfo::ReflectMethodParamsDocumentation
 
struct  RPCServer::Method
 Contains all information on a registered RPC method, including the signature of the method. More...
 
struct  RPCServer::ServiceInfo< TMethodSet >
 Contains all available information about a single RPC service, including the service' name, its registered methods and all implemented RPC interfaces. More...
 
class  RPCServer::RPCReflector
 Special visitor for the reflect() method that visits all method() and interface() calls within the reflect() method to collect the methods and interfaces within the above Service object. More...
 
class  RPCServer::DeferredInvoker< Backend >
 Stores all necessary information to invoke a previously decoded and prepared RPC call. More...
 

Namespaces

 mira
 specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
 

Macros

#define CREATE_WARN_MISSING_PARAMS_DOCUMENTATION(z, n, _)
 
#define RPCGEN_SERVER_METHODS_PUSH_DEFAULTSAMPLE(z, n, _)
 
#define RPCGEN_SERVER_METHODS_PUSH_SAMPLE(z, n, _)
 
#define RPCGEN_SERVER_METHODS(z, n, _)
 
#define RPCGEN_SERVER_PARAMINFO_NAME_DESC(z, n, _)   ParameterInfo(name##n, description##n)
 
#define RPCGEN_SERVER_METHODS_PARAMDESC(z, n, _)
 
#define RPCGEN_SERVER_METHODS_PARAMDESCSAMPLE(z, n, _)
 
#define RPCGEN_SERVER_METHODS_WRONG_ARGUMENT_NUMBER(z, n, _)
 

Detailed Description

Server side implementation of RPC calls.

Author
Erik Einhorn
Date
2010/11/07

Macro Definition Documentation

◆ CREATE_WARN_MISSING_PARAMS_DOCUMENTATION

#define CREATE_WARN_MISSING_PARAMS_DOCUMENTATION (   z,
  n,
 
)
Value:
template<BOOST_PP_ENUM_PARAMS_Z(z,n,typename P)> \
MIRA_DEPRECATED("_________________Please provide parameter descriptions (and sample values, if appropriate) for RPC methods!_________________", \
void warnMissingParamsDocumentation##n (int dummy BOOST_PP_REPEAT_ ## z(n,RPCGEN_CALL_PARAM_DECL,nil))) {}

◆ RPCGEN_SERVER_METHODS_PUSH_DEFAULTSAMPLE

#define RPCGEN_SERVER_METHODS_PUSH_DEFAULTSAMPLE (   z,
  n,
 
)
Value:
m.parameterSamples.push_back(createParameterSample<SampleType##n>());
PropertyHint type(const std::string &t)
Sets the attribute "type" to the specified value.
Definition: PropertyHint.h:295

◆ RPCGEN_SERVER_METHODS_PUSH_SAMPLE

#define RPCGEN_SERVER_METHODS_PUSH_SAMPLE (   z,
  n,
 
)
Value:
m.parameterSamples.push_back(createParameterSample<SampleType##n>(sample##n));
PropertyHint type(const std::string &t)
Sets the attribute "type" to the specified value.
Definition: PropertyHint.h:295

◆ RPCGEN_SERVER_METHODS

#define RPCGEN_SERVER_METHODS (   z,
  n,
 
)

◆ RPCGEN_SERVER_PARAMINFO_NAME_DESC

#define RPCGEN_SERVER_PARAMINFO_NAME_DESC (   z,
  n,
 
)    ParameterInfo(name##n, description##n)

◆ RPCGEN_SERVER_METHODS_PARAMDESC

#define RPCGEN_SERVER_METHODS_PARAMDESC (   z,
  n,
 
)

◆ RPCGEN_SERVER_METHODS_PARAMDESCSAMPLE

#define RPCGEN_SERVER_METHODS_PARAMDESCSAMPLE (   z,
  n,
 
)

◆ RPCGEN_SERVER_METHODS_WRONG_ARGUMENT_NUMBER

#define RPCGEN_SERVER_METHODS_WRONG_ARGUMENT_NUMBER (   z,
  n,
 
)
Value:
template<typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P), typename... Args> \
void method(const char* name, R (*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), \
const char* comment, Args...) \
{ \
invalid_method<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(); \
} \
template<typename R, typename Class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P), typename... Args> \
void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)), Class* This, \
const char* comment, Args...) \
{ \
invalid_method<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(); \
} \
\
template<typename R, typename Class BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P), typename... Args> \
void method(const char* name, R (Class::*fn)(BOOST_PP_ENUM_PARAMS_Z(z,n,P)) const, Class* This, \
const char* comment, Args...) \
{ \
invalid_method<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(); \
} \
\
template<typename R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,typename P), typename... Args> \
void method(const char* name, boost::function<R (BOOST_PP_ENUM_PARAMS_Z(z,n,P))> fn, \
const char* comment, Args...) \
{ \
invalid_method<R BOOST_PP_ENUM_TRAILING_PARAMS_Z(z,n,P)>(); \
} \