#include "{{ cls.name }}.skeleton.h" #include {{ cls.name }}Skeleton::{{ cls.name }}Skeleton({{ cls.name }}& o) : obj(o) {} std::string {{ cls.name }}Skeleton::handleRequest(const std::string& req) { std::istringstream in(req); std::string method; in >> method; {% for m in cls.methods %} if (method == "{{ m.name }}") { {% for a in m.args %}int {{ a.name }}; in >> {{ a.name }}; {% endfor %} int res = obj.{{ m.name }}({% for a in m.args %}{{ a.name }}{% if not loop.last %}, {% endif %}{% endfor %}); return std::to_string(res); } {% endfor %} return std::string("ERR"); }