FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::bt::CsvSource Class Referencefinal

#include <fastmm/backtest/csv_source.hpp>

Inheritance diagram for fastmm::bt::CsvSource:

Public Member Functions

 CsvSource (const std::string &path, VenueId venue=VenueId{0})
 Throws std::runtime_error when the file cannot be read or a row is malformed.
 
const EventHeader * next () override
 
void reset () override
 
Timestamp start_ts () const override
 
std::size_t rows () const noexcept
 

Static Public Member Functions

static CsvSource from_text (std::string text, VenueId venue=VenueId{0})
 Parses in-memory text (tests).
 
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.
 

Constructor & Destructor Documentation

◆ CsvSource()

fastmm::bt::CsvSource::CsvSource ( const std::string &  path,
VenueId  venue = VenueId{0} 
)
explicit

Throws std::runtime_error when the file cannot be read or a row is malformed.

Member Function Documentation

◆ from_text()

static CsvSource fastmm::bt::CsvSource::from_text ( std::string  text,
VenueId  venue = VenueId{0} 
)
static

Parses in-memory text (tests).

◆ next()

const EventHeader * fastmm::bt::CsvSource::next ( )
override

◆ reset()

void fastmm::bt::CsvSource::reset ( )
override

◆ start_ts()

Timestamp fastmm::bt::CsvSource::start_ts ( ) const
inlineoverride

◆ rows()

std::size_t fastmm::bt::CsvSource::rows ( ) const
inlinenoexcept

◆ parse_row()

static bool fastmm::bt::CsvSource::parse_row ( std::string_view  line,
Row &  out 
)
static

Parses one CSV line into a Row; false for blank/comment lines. Throws on bad fields.