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

Method ForEach

libs/indexer/features_vector.hpp:38–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37 template <class ToDo>
38 void ForEach(ToDo && toDo) const
39 {
40 uint32_t index = 0;
41 m_recordReader->ForEachRecord([&](uint32_t pos, std::vector<uint8_t> && data)
42 {
43 FeatureType ft(&m_loadInfo, std::move(data));
44
45 // We can't properly set MwmId here, because FeaturesVector
46 // works with FileContainerR, not with MwmId/MwmHandle/MwmValue.
47 // But it's OK to set at least feature's index, because it can
48 // be used later for Metadata loading.
49 ft.SetID(FeatureID(MwmSet::MwmId(), index));
50 toDo(ft, m_table ? index++ : pos);
51 });
52 }
53
54 template <class ToDo>
55 static void ForEachOffset(FilesContainerR const & cont, ToDo && toDo)

Callers

nothing calls this directly

Calls 4

MwmIdClass · 0.85
ForEachRecordMethod · 0.80
FeatureIDClass · 0.70
SetIDMethod · 0.45

Tested by

no test coverage detected