MCPcopy Create free account
hub / github.com/comaps/comaps / GetValueByKey

Method GetValueByKey

generator/intermediate_data.cpp:316–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316bool IndexFileReader::GetValueByKey(Key key, Value & value) const
317{
318 auto it = lower_bound(m_elements.begin(), m_elements.end(), key, ElementComparator());
319 if (it != m_elements.end() && it->first == key)
320 {
321 value = it->second;
322 return true;
323 }
324 return false;
325}
326
327// IndexFileWriter ---------------------------------------------------------------------------------
328IndexFileWriter::IndexFileWriter(string const & name) : m_fileWriter(name) {}

Callers 1

ReadMethod · 0.80

Calls 3

ElementComparatorClass · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected