| 15 | namespace stream { |
| 16 | |
| 17 | class CSVReader : public Stream { |
| 18 | public: |
| 19 | CSVReader( |
| 20 | const std::string& filename, |
| 21 | char sep = ',', |
| 22 | char quote = '"', |
| 23 | const std::filesystem::path& local_prefix = "", |
| 24 | std::shared_ptr<core::FileFetcher> fetcher = nullptr); |
| 25 | CSVReader( |
| 26 | const std::shared_ptr<std::istream>& f, |
| 27 | char sep = ',', |
| 28 | char quote = '"', |
| 29 | std::shared_ptr<core::FileFetcherHandle> file_handle = nullptr); |
| 30 | virtual Sample next() const override; |
| 31 | void reset() override; |
| 32 | |
| 33 | private: |
| 34 | std::unique_ptr<core::CSVReader> csv_; |
| 35 | std::vector<std::string> keys_; |
| 36 | std::shared_ptr<core::FileFetcherHandle> fileHandle_; |
| 37 | mutable std::mutex mutex_; |
| 38 | }; |
| 39 | |
| 40 | class CSVReaderFromKey : public Compose { |
| 41 | public: |
nothing calls this directly
no outgoing calls
no test coverage detected