#ifndef PROCESS_COMMAND_RECEIVER_HPP #define PROCESS_COMMAND_RECEIVER_HPP #include #include "process/process_collection.hpp" #include "process_command.hpp" namespace process::controller { class CommandListener; class CommandReceiver { public: CommandReceiver(const std::shared_ptr& collection, const std::shared_ptr& participant, const std::string& topic_name); CommandReceiver(const std::shared_ptr& collection, const std::shared_ptr& participant, const std::string& topic_name, const std::function& validator); virtual ~CommandReceiver() = default; CommandReceiver(CommandReceiver&&) = delete; CommandReceiver& operator=(CommandReceiver&&) & = delete; CommandReceiver(const CommandReceiver&) = delete; CommandReceiver& operator=(const CommandReceiver&) & = delete; private: const std::string m_participant_topic; std::shared_ptr m_cmd_listener; std::shared_ptr participant; std::shared_ptr> subscriber; }; } #endif //PROCESS_COMMAND_RECEIVER_HPP