Alpha 1-9
Pre-release
Pre-release
This release includes:
- A bugfix for
const char*
that tried to reassign to a const pointer, now treats it as a normalchar*
for reading - Optional helper macros for the
rpc::dispatch
function instantiation:-
#include "rpc_dispatch_helper.hpp"
to use -
RPC_DEFAULT_DISPATCH
takes a list of function names (no quotes) and generates the whole dispatch function, binding the functions in the list to the dispatcher- This macro call replaces instantiating the
rpc::dispatch
function, but is not customizable - The default behavior is to exactly match the function name to the function to call and throw an exception if none are matched
- This macro call replaces instantiating the
-
The following are used within the
rpc::dispatch
function instantiation:RPC_ATTACH_FUNC
attaches a single function to the dispatcher by name (no quotes)RPC_ATTACH_FUNCS
attaches a list of function names to the dispatcherRPC_ALIAS_FUNC
takes a function name and an "alias" string (no quotes) that can be used to also call that functionRPC_MULTI_ALIAS_FUNC
takes a function name and at least one alias string (no quotes) and binds all of the aliases to call that function
-
By default, the macro only allows for 20 function to be added at one time (via
RPC_DEFAULT_DISPATCH
orRPC_ATTACH_FUNCS
) or 20 aliases to be added at one time (viaRPC_MULTI_ALIAS_FUNC
), but if more are needed, a python scriptdispatch_gen.py
can be run with the number of instances you need as a parameter and will generate the header file for you (ex:$ python dispatch_gen.py 50
)
-