| 111 | |
| 112 | |
| 113 | bool INIParser::GetValue(const string §ion, const string &key, string &val) { |
| 114 | phxqueue::comm::utils::RWLock rwlock_read(&impl_->rwlock, phxqueue::comm::utils::RWLock::LockMode::READ); |
| 115 | |
| 116 | val = ""; |
| 117 | auto &&it = impl_->section_key2val.find(make_pair(section, key)); |
| 118 | if (impl_->section_key2val.end() == it) { |
| 119 | return false; |
| 120 | } |
| 121 | val = it->second; |
| 122 | if (impl_->del_after_get) impl_->section_key2val.erase(it); |
| 123 | return true; |
| 124 | } |
| 125 | |
| 126 | void INIParser::SetDelAfterGet(bool del_after_get) { |
| 127 | impl_->del_after_get = del_after_get; |
nothing calls this directly
no outgoing calls
no test coverage detected