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

Method GetFeature

libs/search/mwm_context.cpp:38–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38std::unique_ptr<FeatureType> MwmContext::GetFeature(uint32_t index, bool ignoreEditedStatus) const
39{
40 if (ignoreEditedStatus)
41 {
42 auto ft = m_vector.GetByIndex(index);
43 CHECK(ft, ());
44 ft->SetID(FeatureID(GetId(), index));
45 return ft;
46 }
47
48 std::unique_ptr<FeatureType> ft;
49 switch (GetEditedStatus(index))
50 {
51 case FeatureStatus::Deleted:
52 case FeatureStatus::Obsolete: return ft;
53 case FeatureStatus::Modified:
54 case FeatureStatus::Created:
55 ft = m_editableSource.GetModifiedFeature(index);
56 CHECK(ft, ());
57 return ft;
58 case FeatureStatus::Untouched:
59 auto ft = m_vector.GetByIndex(index);
60 CHECK(ft, ());
61 ft->SetID(FeatureID(GetId(), index));
62 return ft;
63 }
64 UNREACHABLE();
65}
66
67std::optional<uint32_t> MwmContext::GetStreet(uint32_t index) const
68{

Callers 12

BuildAddressTableFunction · 0.45
GetNamesMethod · 0.45
GetCenterMethod · 0.45
FillLocalitiesTableMethod · 0.45
FillVillageLocalitiesMethod · 0.45
TraceResultMethod · 0.45
GetTypeInGeocodingMethod · 0.45
GetByIndexMethod · 0.45
LoadStreetMethod · 0.45
operator()Method · 0.45
AcceptMessageMethod · 0.45

Calls 5

GetIdFunction · 0.85
FeatureIDClass · 0.70
GetByIndexMethod · 0.45
SetIDMethod · 0.45
GetModifiedFeatureMethod · 0.45

Tested by

no test coverage detected