#pragma once #include // Простейшее type-erased значение для RPC. // PoC: поддерживаем только int, но интерфейс позволяет в будущем // добавить другие типы (string, bool, и т.д.). enum class RpcType { Int, }; class RpcValue { public: RpcValue() : type_(RpcType::Int), i_(0) {} static RpcValue fromInt(int v) { RpcValue r; r.type_ = RpcType::Int; r.i_ = v; return r; } RpcType type() const { return type_; } int asInt() const { // PoC: единственный поддерживаемый тип. return i_; } private: RpcType type_; int i_; }; using RpcArgs = std::vector;