#include "{{ cls.name }}.proxy.h" #include "rpc/RpcClient.h" class {{ cls.name }}Proxy::Impl { public: explicit Impl(RpcChannel& ch) : client(ch) {} RpcClient client; }; {{ cls.name }}Proxy::{{ cls.name }}Proxy(RpcChannel& ch) : impl(new Impl(ch)) {} {% for m in cls.methods %} {{ m.return_type }} {{ cls.name }}Proxy::{{ m.name }}({% for a in m.args %}{{ a.type }} {{ a.name }}{% if not loop.last %}, {% endif %}{% endfor %}) { return impl->client.call<{{ m.return_type }}>("{{ cls.name }}.{{ m.name }}"{% for a in m.args %}, {{ a.name }}{% endfor %}); } {% endfor %}