]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/workspace_tools/data/rpc/class.cpp
Merge commit '28203e909e83b1ac6becb45a3eadae23b190df32' into master-core-pull
[max/tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / workspace_tools / data / rpc / class.cpp
1 class Rpc{{name}} : public RPC {
2 public:
3     Rpc{{name}}({{cons_proto}}) : RPC(name), o({{cons_call}}) {}
4
5     {{methods}}
6
7     virtual const struct rpc_method *get_rpc_methods() {
8         static const rpc_method rpc_methods[] = {
9             {{rpc_methods}},
10             RPC_METHOD_SUPER(RPC)
11         };
12         return rpc_methods;
13     }
14     static struct rpc_class *get_rpc_class() {
15         static const rpc_function funcs[] = {
16             {"new", rpc_function_caller<const char*, {{cons_type}}, &RPC::construct<Rpc{{name}}, {{cons_type}}> >},
17             RPC_METHOD_END
18         };
19         static rpc_class c = {"{{name}}", funcs, NULL};
20         return &c;
21     }
22 private:
23     {{name}} o;
24 };