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

Method ReadFeatureType

libs/indexer/data_source.cpp:94–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92
93private:
94 static void ReadFeatureType(DataSource::FeatureCallback const & fn, FeatureSource & src, uint32_t index)
95 {
96 std::unique_ptr<FeatureType> ft;
97 switch (src.GetFeatureStatus(index))
98 {
99 case FeatureStatus::Deleted:
100 case FeatureStatus::Obsolete: return;
101 case FeatureStatus::Created:
102 case FeatureStatus::Modified:
103 {
104 ft = src.GetModifiedFeature(index);
105 break;
106 }
107 case FeatureStatus::Untouched:
108 {
109 ft = src.GetOriginalFeature(index);
110 break;
111 }
112 }
113
114 CHECK(ft, ());
115 fn(*ft);
116 }
117};
118
119} // namespace

Callers

nothing calls this directly

Calls 3

GetOriginalFeatureMethod · 0.80
GetFeatureStatusMethod · 0.45
GetModifiedFeatureMethod · 0.45

Tested by

no test coverage detected