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

Method GetFeatureByIndex

libs/indexer/data_source.cpp:147–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147std::unique_ptr<FeatureType> FeaturesLoaderGuard::GetFeatureByIndex(uint32_t index) const
148{
149 ASSERT(m_handle.IsAlive(), ());
150 ASSERT_NOT_EQUAL(FeatureStatus::Deleted, m_source->GetFeatureStatus(index),
151 ("Deleted feature was cached. It should not be here. Please review your code."));
152
153 auto ft = m_source->GetModifiedFeature(index);
154 if (ft)
155 return ft;
156
157 return GetOriginalFeatureByIndex(index);
158}
159
160std::unique_ptr<FeatureType> FeaturesLoaderGuard::GetOriginalFeatureByIndex(uint32_t index) const
161{

Callers 15

SearchByFeatureIdMethod · 0.45
EmitWithMetadataMethod · 0.45
operator()Method · 0.45
LoadMethod · 0.45
LoadFeatureImplMethod · 0.45
mainFunction · 0.45
EditFeatureMethod · 0.45
UNIT_CLASS_TESTFunction · 0.45
UNIT_TESTFunction · 0.45
CollectNamesMethod · 0.45
FillFeatureInfoMethod · 0.45

Calls 4

ASSERTFunction · 0.85
IsAliveMethod · 0.45
GetFeatureStatusMethod · 0.45
GetModifiedFeatureMethod · 0.45

Tested by 7

EditFeatureMethod · 0.36
UNIT_CLASS_TESTFunction · 0.36
UNIT_TESTFunction · 0.36
CollectNamesMethod · 0.36
UNIT_TESTFunction · 0.36
UNIT_TESTFunction · 0.36