apps/argos/PipelineStagerInterface.hpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // <PipelineStagerInterface.hpp> -*- C++ -*- | ||
| 2 | |||
| 3 | #pragma once | ||
| 4 | |||
| 5 | #include "simdb/apps/argos/PipelineDataTypes.hpp" | ||
| 6 | #include "simdb/utils/TinyStrings.hpp" | ||
| 7 | |||
| 8 | #include <cstdint> | ||
| 9 | #include <map> | ||
| 10 | #include <string> | ||
| 11 | #include <vector> | ||
| 12 | |||
| 13 | namespace simdb::argos { | ||
| 14 | |||
| 15 | //! \brief Interface class to receive collected data, notifications, and open/close state changes. | ||
| 16 | class PipelineStagerInterface | ||
| 17 | { | ||
| 18 | public: | ||
| 19 | 5 | virtual ~PipelineStagerInterface() = default; | |
| 20 | |||
| 21 | virtual void stage(uint16_t cid, std::vector<char>&& scalar_bytes) = 0; | ||
| 22 | |||
| 23 | virtual void stage(uint16_t cid, std::vector<std::vector<char>>&& contig_bin_bytes) = 0; | ||
| 24 | |||
| 25 | virtual void stage(uint16_t cid, std::map<uint16_t, std::vector<char>>&& sparse_bin_bytes) = 0; | ||
| 26 | |||
| 27 | virtual void closeRecord(uint16_t cid) = 0; | ||
| 28 | |||
| 29 | virtual void postNotif(const std::string& notif, NotifType type) = 0; | ||
| 30 | |||
| 31 | void postWarning(const std::string& warning) { postNotif(warning, NotifType::WARNING); } | ||
| 32 | |||
| 33 | void postError(const std::string& error) { postNotif(error, NotifType::ERROR); } | ||
| 34 | |||
| 35 | void postMessage(const std::string& msg) { postNotif(msg, NotifType::MESSAGE); } | ||
| 36 | }; | ||
| 37 | |||
| 38 | } // namespace simdb::argos | ||
| 39 |