#ifndef SPAWNER_HH #define SPAWNER_HH #include #include #include namespace io { class Reader; class Writer; }; // namespace io class Process { public: virtual ~Process() = default; virtual io::Reader& reader() const = 0; virtual io::Writer& writer() const = 0; protected: Process() = default; Process(Process const&) = delete; Process& operator=(Process const&) = delete; }; class Spawner { public: enum class Exec : uint8_t { kImageProcessor, }; enum class Error : uint8_t { kError, }; virtual ~Spawner() = default; [[nodiscard]] virtual std::expected, Error> run(Exec exec) = 0; static std::expected, Error> create(); protected: Spawner() = default; Spawner(Spawner const&) = delete; Spawner& operator=(Spawner const&) = delete; }; #endif // SPAWNER_HH