#pragma once #include "core.h" #include /** * @brief * */ class IpcRequestReplyContext { private: std::unique_ptr strategy; public: void setStrategy(std::unique_ptr newStrategy) { strategy = std::move(newStrategy); } std::expected send(const std::string& message) { if (strategy) { return strategy->send(message); } return std::unexpected("Not Found Strategy"); } std::expected receive() { if (strategy) { return strategy->receive(); } return std::unexpected("Not Found Strategy"); } };