New cpp folder structure

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-17 22:35:52 +03:00
committed by Konstantin Pastbin
parent c9cbb64f12
commit 76ffc99abd
2390 changed files with 345 additions and 339 deletions

View File

@@ -0,0 +1,25 @@
#include "editor/editable_feature_source.hpp"
#include "editor/osm_editor.hpp"
FeatureStatus EditableFeatureSource::GetFeatureStatus(uint32_t index) const
{
osm::Editor & editor = osm::Editor::Instance();
return editor.GetFeatureStatus(m_handle.GetId(), index);
}
std::unique_ptr<FeatureType> EditableFeatureSource::GetModifiedFeature(uint32_t index) const
{
osm::Editor & editor = osm::Editor::Instance();
auto const emo = editor.GetEditedFeature(FeatureID(m_handle.GetId(), index));
if (emo)
return FeatureType::CreateFromMapObject(*emo);
return {};
}
void EditableFeatureSource::ForEachAdditionalFeature(m2::RectD const & rect, int scale,
std::function<void(uint32_t)> const & fn) const
{
osm::Editor & editor = osm::Editor::Instance();
editor.ForEachCreatedFeature(m_handle.GetId(), fn, rect, scale);
}