| 34 | } |
| 35 | |
| 36 | bool TextFileReader::Read(std::string* key, std::string* value) { |
| 37 | CHECK(fdat_.is_open()) << "File not open!"; |
| 38 | key->clear(); |
| 39 | value->clear(); |
| 40 | if (!std::getline(fdat_, *value)) { |
| 41 | if (fdat_.eof()) |
| 42 | return false; |
| 43 | else |
| 44 | LOG(FATAL) << "Error in reading text file"; |
| 45 | } |
| 46 | *key = std::to_string(lineNo_++); |
| 47 | return true; |
| 48 | } |
| 49 | |
| 50 | int TextFileReader::Count() { |
| 51 | std::ifstream fin(path_, std::ios::in); |
nothing calls this directly
no outgoing calls
no test coverage detected