Files
UoL/CM2005 Object Oriented Programming/Topic 4/4.4.9/CSVReader.h
2021-06-11 14:40:18 -05:00

22 lines
665 B
C++

#pragma once
#include "OrderBookEntry.h"
#include <vector>
#include <string>
class CSVReader
{
public:
CSVReader();
static std::vector<OrderBookEntry> readCSV(std::string csvFile);
static std::vector<std::string> tokenise(std::string csvLine, char separator);
static OrderBookEntry stringsToOBE(std::string price,
std::string amount,
std::string timestamp,
std::string product,
OrderBookType orderType);
private:
static OrderBookEntry stringsToOBE(std::vector<std::string> strings);
};