MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / readCsv

Function readCsv

src/fe-analyselayout.cc:205–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static Image readCsv(const std::string& filename)
206{
207 if (filename == "")
208 error("you must specify an input CSV file");
209
210 inputFile.open(filename);
211 check_for_error();
212
213 CsvReader csvReader(inputFile);
214 std::vector<std::string> row = csvReader.readLine();
215 if (row.size() != 13)
216 bad_csv();
217
218 Image image;
219 for (;;)
220 {
221 row = csvReader.readLine();
222 if (row.size() == 0)
223 break;
224
225 readRow(row, image);
226 }
227
228 image.calculateSize();
229 return image;
230}
231
232int mainAnalyseLayout(int argc, const char* argv[])
233{

Callers 1

mainAnalyseLayoutFunction · 0.85

Calls 8

errorFunction · 0.85
check_for_errorFunction · 0.85
bad_csvFunction · 0.85
readRowFunction · 0.85
openMethod · 0.80
calculateSizeMethod · 0.80
readLineMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected