7#include "fastmm/backtest/binance_source.hpp"
17class CsvSource final :
public MdSource {
25 void reset()
override;
27 [[nodiscard]] std::size_t
rows() const noexcept {
return rows_; }
33 CsvSource(std::string text, std::unique_ptr<CsvLineReader> file,
VenueId venue);
34 bool next_line(std::string_view& line);
38 std::unique_ptr<CsvLineReader> file_;
40 std::size_t line_no_ = 0;
41 std::size_t rows_ = 0;
Definition csv_source.hpp:19
static CsvSource from_text(std::string text, VenueId venue=VenueId{0})
Parses in-memory text (tests).
const EventHeader * next() override
static bool parse_row(std::string_view line, Row &out)
Parses one CSV line into a Row; false for blank/comment lines. Throws on bad fields.
std::size_t rows() const noexcept
Definition csv_source.hpp:29
Timestamp start_ts() const override
Definition csv_source.hpp:28
Builds messages from a row stream. Provider is bool(Row&) returning false at end.
Definition data_source.hpp:58
DataSource (8.4): a timestamp-ordered stream of normalized market-data events consumed by the simulat...
Definition backtest_config.hpp:44
Definition data_source.hpp:47