You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
598 B
Django/Jinja

#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 %}