Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
class.cpp
00001 class Rpc{{name}} : public RPC { 00002 public: 00003 Rpc{{name}}({{cons_proto}}) : RPC(name), o({{cons_call}}) {} 00004 00005 {{methods}} 00006 00007 virtual const struct rpc_method *get_rpc_methods() { 00008 static const rpc_method rpc_methods[] = { 00009 {{rpc_methods}}, 00010 RPC_METHOD_SUPER(RPC) 00011 }; 00012 return rpc_methods; 00013 } 00014 static struct rpc_class *get_rpc_class() { 00015 static const rpc_function funcs[] = { 00016 {"new", rpc_function_caller<const char*, {{cons_type}}, &RPC::construct<Rpc{{name}}, {{cons_type}}> >}, 00017 RPC_METHOD_END 00018 }; 00019 static rpc_class c = {"{{name}}", funcs, NULL}; 00020 return &c; 00021 } 00022 private: 00023 {{name}} o; 00024 };
Generated on Sun Jul 17 2022 08:25:21 by 1.7.2