Skip to content

Alpha 1-9

Pre-release
Pre-release
Compare
Choose a tag to compare
@jharmer95 jharmer95 released this 05 Jun 22:10

This release includes:

  • A bugfix for const char* that tried to reassign to a const pointer, now treats it as a normal char* 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
    • 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 dispatcher
      • RPC_ALIAS_FUNC takes a function name and an "alias" string (no quotes) that can be used to also call that function
      • RPC_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 or RPC_ATTACH_FUNCS) or 20 aliases to be added at one time (via RPC_MULTI_ALIAS_FUNC), but if more are needed, a python script dispatch_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)