mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
33
editor/editable_feature_source.hpp
Normal file
33
editor/editable_feature_source.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "indexer/feature.hpp"
|
||||
#include "indexer/feature_source.hpp"
|
||||
#include "indexer/mwm_set.hpp"
|
||||
|
||||
#include "geometry/rect2d.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
class EditableFeatureSource final : public FeatureSource
|
||||
{
|
||||
public:
|
||||
explicit EditableFeatureSource(MwmSet::MwmHandle const & handle) : FeatureSource(handle) {}
|
||||
|
||||
// FeatureSource overrides:
|
||||
FeatureStatus GetFeatureStatus(uint32_t index) const override;
|
||||
std::unique_ptr<FeatureType> GetModifiedFeature(uint32_t index) const override;
|
||||
void ForEachAdditionalFeature(m2::RectD const & rect, int scale,
|
||||
std::function<void(uint32_t)> const & fn) const override;
|
||||
};
|
||||
|
||||
class EditableFeatureSourceFactory : public FeatureSourceFactory
|
||||
{
|
||||
public:
|
||||
// FeatureSourceFactory overrides:
|
||||
std::unique_ptr<FeatureSource> operator()(MwmSet::MwmHandle const & handle) const override
|
||||
{
|
||||
return std::make_unique<EditableFeatureSource>(handle);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user