#pragma once #include class ProxyMarshaller { public: explicit ProxyMarshaller(IpcChannel& ch) : channel(ch) {} template Ret call(const std::string& method, const Args&... args) { IpcMessage msg; // имя метода msg.add(method); // аргументы (msg.add(args), ...); // отправить channel.send(msg); // получить ответ IpcMessage resp = channel.receive(); return resp.template get(); } private: IpcChannel& channel; };