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

Function DumpFeatureNames

generator/dumper.cpp:192–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void DumpFeatureNames(string const & fPath, string const & lang)
193{
194 localisation::LanguageIndex const languageIndex = localisation::ConvertLanguageCodeToLanguageIndex(lang);
195
196 feature::ForEachFeature(fPath, [&](FeatureType & f, uint32_t)
197 {
198 f.ForEachName([&](localisation::LanguageIndex someLanguageIndex, std::string_view name)
199 {
200 CHECK(!name.empty(), ("Feature name is empty"));
201
202 if (languageIndex == localisation::kUnsupportedLanguageIndex)
203 cout << localisation::ConvertLanguageIndexToLanguageCode(someLanguageIndex) << ' ' << name << endl;
204 else if (someLanguageIndex == languageIndex)
205 cout << name << endl;
206 });
207 });
208}
209} // namespace features_dumper

Callers 1

generator_tool.cppFile · 0.85

Calls 5

ForEachFeatureFunction · 0.85
ForEachNameMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected