您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

123456789101112131415161718192021222324
  1. class Rpc{{name}} : public RPC {
  2. public:
  3. Rpc{{name}}({{cons_proto}}) : RPC(name), o({{cons_call}}) {}
  4. {{methods}}
  5. virtual const struct rpc_method *get_rpc_methods() {
  6. static const rpc_method rpc_methods[] = {
  7. {{rpc_methods}},
  8. RPC_METHOD_SUPER(RPC)
  9. };
  10. return rpc_methods;
  11. }
  12. static struct rpc_class *get_rpc_class() {
  13. static const rpc_function funcs[] = {
  14. {"new", rpc_function_caller<const char*, {{cons_type}}, &RPC::construct<Rpc{{name}}, {{cons_type}}> >},
  15. RPC_METHOD_END
  16. };
  17. static rpc_class c = {"{{name}}", funcs, NULL};
  18. return &c;
  19. }
  20. private:
  21. {{name}} o;
  22. };