16 m_valid(false) , m_firstsearch(true) , m_table(), m_columnwidth(0)
18 std::istream_iterator<std::string> file_start{
inputfile};
19 std::istream_iterator<std::string> file_end;
21 std::vector<std::string> fileContent;
22 std::copy(file_start,file_end,back_inserter(fileContent));
24 fileContent.erase(
begin(fileContent));
28 for (
auto&
line: fileContent){
29 std::vector<std::string> table_entry;
32 std::stringstream lineStream(
line);
34 while(std::getline(lineStream,
cell,
','))
35 table_entry.push_back(
cell);
36 m_table.push_back(std::move(table_entry));
49 const std::vector<std::pair<int,std::string>>& argumentpairs){
55 std::shared_ptr<CSVWrapper::tableline> return_ptr (
60 std::cout <<
"Duplicate found!" << std::endl;
62 for (
const auto &
r:
res) {
63 std::cout <<
r <<
", ";
65 std::cout << std::endl;
67 throw "Non unique result to FindLine";
71 std::shared_ptr<CSVWrapper::tableline> return_ptr (
82 const std::vector<std::pair<int,std::string>>& argumentpairs){
85 std::vector<std::shared_ptr<CSVWrapper::tableline>> return_vec;
89 std::shared_ptr<CSVWrapper::tableline> return_ptr (
91 return_vec.push_back(std::move(return_ptr));
95 std::shared_ptr<CSVWrapper::tableline> return_ptr (
97 return_vec.push_back(std::move(return_ptr));
119 std::cout <<
row.at(
idx) <<
" , ";
121 std::cout << std::endl;
130 std::vector<bool> matchvector(argumentpairs.size(),
false);
136 for(
const auto& newsearch : argumentpairs){
139 if(!matchvector.at(
idx))
break;
151 size_t searchcolumnidx = 0;
154 std::vector<CSVWrapper::tableline>
result;
159 auto search = argumentpairs.at(searchcolumnidx);