13 m_valid(false) , m_firstsearch(true) , m_table(), m_columnwidth(0)
15 std::istream_iterator<std::string> file_start{
inputfile};
16 std::istream_iterator<std::string> file_end;
18 std::vector<std::string> fileContent;
19 std::copy(file_start,file_end,back_inserter(fileContent));
21 fileContent.erase(
begin(fileContent));
25 for (
auto&
line: fileContent){
26 std::vector<std::string> table_entry;
29 std::stringstream lineStream(
line);
31 while(std::getline(lineStream,
cell,
','))
32 table_entry.push_back(
cell);
46 const std::vector<std::pair<int,std::string>>& argumentpairs){
52 std::shared_ptr<CSVWrapper::tableline> return_ptr (
57 std::cout <<
"Duplicate found!" << std::endl;
60 std::cout <<
r <<
", ";
62 std::cout << std::endl;
64 throw "Non unique result to FindLine";
68 std::shared_ptr<CSVWrapper::tableline> return_ptr (
79 const std::vector<std::pair<int,std::string>>& argumentpairs){
82 std::vector<std::shared_ptr<CSVWrapper::tableline>> return_vec;
86 std::shared_ptr<CSVWrapper::tableline> return_ptr (
88 return_vec.push_back(return_ptr);
92 std::shared_ptr<CSVWrapper::tableline> return_ptr (
94 return_vec.push_back(return_ptr);
116 std::cout <<
row.at(
idx) <<
" , ";
118 std::cout << std::endl;
127 std::vector<bool> matchvector(argumentpairs.size(),
false);
133 for(
const auto& newsearch : argumentpairs){
136 if(!matchvector.at(
idx))
break;
148 size_t searchcolumnidx = 0;
151 std::vector<CSVWrapper::tableline>
result;
156 auto search = argumentpairs.at(searchcolumnidx);