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

Method PrepareToSaveBookmarksForTrack

libs/map/bookmark_manager.cpp:3075–3090  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3073}
3074
3075BookmarkManager::KMLDataCollectionPtr BookmarkManager::PrepareToSaveBookmarksForTrack(kml::TrackId trackId)
3076{
3077 CHECK_THREAD_CHECKER(m_threadChecker, ());
3078 auto collection = std::make_shared<KMLDataCollection>();
3079 auto const & track = GetTrack(trackId);
3080 auto const & categoryData = new kml::CategoryData();
3081 auto name = kml::LocalizableString();
3082 kml::SetDefaultStr(name, track->GetName());
3083 categoryData->m_name = name;
3084 auto const & trackData = track->GetData();
3085 auto const & fileData = new kml::FileData();
3086 fileData->m_categoryData = *categoryData;
3087 fileData->m_tracksData.push_back(trackData);
3088 collection->emplace_back("", fileData);
3089 return collection;
3090}
3091
3092BookmarkManager::KMLDataCollectionPtr BookmarkManager::PrepareToSaveBookmarks(
3093 kml::GroupIdCollection const & groupIdCollection)

Callers

nothing calls this directly

Calls 5

SetDefaultStrFunction · 0.85
GetNameMethod · 0.45
GetDataMethod · 0.45
push_backMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected