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

Method AddWithEditor

generator/generator_tests_support/test_feature.cpp:303–318  ·  view source on GitHub ↗

static

Source from the content-addressed store, hash-verified

301
302// static
303std::pair<TestPOI, FeatureID> TestPOI::AddWithEditor(osm::Editor & editor, MwmSet::MwmId const & mwmId,
304 string const & enName, m2::PointD const & pt)
305{
306 TestPOI poi(pt, enName, "en");
307
308 osm::EditableMapObject emo;
309 editor.CreatePoint(classif().GetTypeByPath({"shop", "bakery"}), pt, mwmId, emo);
310
311 StringUtf8Multilang names;
312 names.AddString(localisation::ConvertLanguageCodeToLanguageIndex("en"), enName);
313 emo.SetName(names);
314 emo.SetTestId(poi.GetId());
315
316 editor.SaveEditedFeature(emo);
317 return {poi, emo.GetID()};
318}
319
320void TestPOI::Serialize(FeatureBuilder & fb) const
321{

Callers

nothing calls this directly

Calls 9

CreatePointMethod · 0.80
GetTypeByPathMethod · 0.80
SetTestIdMethod · 0.80
SaveEditedFeatureMethod · 0.80
AddStringMethod · 0.45
SetNameMethod · 0.45
GetIdMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected