| 203 | } |
| 204 | |
| 205 | static 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 | |
| 232 | int mainAnalyseLayout(int argc, const char* argv[]) |
| 233 | { |
no test coverage detected