15 #ifndef BORNAGAIN_GUI2_DATALOADER_PARSERINTERFACE_H
16 #define BORNAGAIN_GUI2_DATALOADER_PARSERINTERFACE_H
18 #include "darefl_export.h"
31 virtual void process(
const std::vector<std::string>& raw_data) = 0;
37 virtual std::string
getLine(
size_t index)
const = 0;
41 virtual std::vector<std::string>
parseResults(
size_t index)
const = 0;
44 virtual std::vector<std::vector<std::string>>
parsedData()
const = 0;
Interface for all classes capable of parsing ASCII data into multicolumn presentation.
virtual std::vector< std::string > parseResults(size_t index) const =0
Returns parsed text for given line index.
virtual std::string getLine(size_t index) const =0
Returns original line.
virtual void process(const std::vector< std::string > &raw_data)=0
Parse data representing content of ASCII file.
virtual std::vector< std::vector< std::string > > parsedData() const =0
Returns 2D vector representing parsed text. Skipped lines are not present.
virtual ~ParserInterface()=default
virtual size_t totalLineCount() const =0
Returns total number of lines in raw data.
Based on Qt example "codeeditor" Copyright (C) 2016 The Qt Company Ltd.