13 #ifndef OUT_DATA_STRUCT_HPP
14 #define OUT_DATA_STRUCT_HPP
23 unsigned int errorCode;
25 std::vector<std::string> contents;
26 std::vector<std::string> wcaches;
27 unsigned int highlightedCounter;
28 unsigned int foundCounter;
30 OutDataStruct():errorCode(0), errorMsg(
""), highlightedCounter(0), foundCounter(0) {}
33 errorCode = _errorCode;
41 contents.push_back(content);
45 contents.push_back(content);
49 wcaches.push_back(wcache);
53 wcaches.push_back(wcache);
58 highlightedCounter = _highlightedCounter;
62 foundCounter = _foundCounter;
75 if(i >= contents.size())
77 throw std::out_of_range(
"contents out of range");
83 if(wcaches.size() <= i)
85 throw std::out_of_range(
">>> Index out of range");
91 return highlightedCounter;
99 return contents.size();
103 return wcaches.size();