| 345 | } |
| 346 | |
| 347 | void FileContents::reIndex(int line) |
| 348 | { |
| 349 | if (indexField == -1) { |
| 350 | return; |
| 351 | } |
| 352 | assert(line >= 0); |
| 353 | assert(line < realLinesInFile); |
| 354 | |
| 355 | char tmp[SIPP_MAX_MSG_SIZE]; |
| 356 | getField(line, indexField, tmp, SIPP_MAX_MSG_SIZE); |
| 357 | str_int_map::iterator index_it = indexMap->find(str_int_map::key_type(tmp)); |
| 358 | if (index_it != indexMap->end()) { |
| 359 | indexMap->erase(index_it); |
| 360 | } |
| 361 | indexMap->insert(std::pair<str_int_map::key_type,int>(str_int_map::key_type(tmp), line)); |
| 362 | } |
| 363 | |
| 364 | void FileContents::deIndex(int line) |
| 365 | { |