Turi Create
4.0
|
Namespaces | |
cppipc | |
Macros | |
#define | GENERATE_INTERFACE(base_name, proxy_name, functions) |
#define | GENERATE_PROXY(base_name, proxy_name, functions) |
#define | GENERATE_INTERFACE_AND_PROXY(base_name, proxy_name, functions) |
#define | REGISTRATION_BEGIN(name) |
Functions | |
template<typename MemFn , typename... Args> | |
void | cppipc::issue (turi::oarchive &msg, MemFn fn, const Args &... args) |
std::string | cppipc::reply_status_to_string (reply_status) |
template<typename MemFn > | |
dispatch * | cppipc::create_dispatch (MemFn memfn) |
#define GENERATE_INTERFACE | ( | base_name, | |
proxy_name, | |||
functions | |||
) |
Magic Interface generating macro. Like GENERATE_INTERFACE_AND_PROXY but only generates the interface.
To use, call with the 1st argument as the base name of the interface, and the 2nd argument as a sequence of:
To get a function with no arguments simply have an empty 3rd argument. (the 3rd argument is still needed. Observe the comma. It is just empty.)
For instance,
will create a base class called object_base with 3 functions, ping, add_one, and add, with the appropriate registration functions.
The above macro generates the following code:
Definition at line 106 of file magic_macros.hpp.
#define GENERATE_INTERFACE_AND_PROXY | ( | base_name, | |
proxy_name, | |||
functions | |||
) |
Magic Interface and proxy generating macro.
To use, call with the 1st argument as the base name of the interface, the 2nd argument as the name of the proxy class, and the 3nd argument as a sequence of:
To get a function with no arguments simply have an empty 3rd argument. (the 3rd argument is still needed. Observe the comma. It is just empty.)
For instance,
will create a base class called object_base with 3 functions, ping, add_one, and add, with the appropriate registration functions, as well as a proxy object with the appropriate proxy forwarding calls.
The above macro generates all of the following code:
Definition at line 293 of file magic_macros.hpp.
#define GENERATE_PROXY | ( | base_name, | |
proxy_name, | |||
functions | |||
) |
Magic proxy generating macro.
Like GENERATE_INTERFACE_AND_PROXY but only generates the proxy.
To use, call with the 1st argument as the base name of the interface, the 2nd argument as the name of the proxy class, and the 3nd argument as a sequence of:
To get a function with no arguments simply have an empty 3rd argument. (the 3rd argument is still needed. Observe the comma. It is just empty.)
For instance,
will create a base class called object_base with 3 functions, ping, add_one, and add, with the appropriate registration functions, as well as a proxy object with the appropriate proxy forwarding calls.
The above macro generates all of the following code:
Definition at line 184 of file magic_macros.hpp.
#define REGISTRATION_BEGIN | ( | name | ) |
Macros which help member function registration for IPC objects. For instance, given the following base class which we would like to export.
We simply introduce a REGISTRATION_BEGIN inside the public section of the object, and call REGISTER once for each member function to export. The result object definition is as follows:
The registration macros adds 2 static functions. The first function is
Where "name" is the argument provided to REGISTRATION_BEGIN macro. This name is used for object creation and must uniquely identify the type of the object.
The second function is
and is used by both the client side and the server side to identify and name the member functions available.
Definition at line 69 of file registration_macros.hpp.
|
strong |
The reply status.
Definition at line 79 of file message_types.hpp.
dispatch* cppipc::create_dispatch | ( | MemFn | memfn | ) |
Creates a dispatch object which wraps a given member function.
Definition at line 174 of file dispatch_impl.hpp.
void cppipc::issue | ( | turi::oarchive & | msg, |
MemFn | fn, | ||
const Args &... | args | ||
) |
std::string cppipc::reply_status_to_string | ( | reply_status | ) |
Generates a printable string version of the a reply_status