diff options
author | Alex Zolotarev <alex@maps.me> | 2016-03-07 13:40:51 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:52:44 +0300 |
commit | 17dc6e67c337bd9b2182688042073ccfdb9537cd (patch) | |
tree | 130d407cc7ad12cb7b5f39130eff9bf206523969 /indexer/feature.hpp | |
parent | d48b236fb0265d28b889141b03e2fdd100d45e6a (diff) |
[editor] Correctly initialize FeatureType when create new features.
Diffstat (limited to 'indexer/feature.hpp')
-rw-r--r-- | indexer/feature.hpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indexer/feature.hpp b/indexer/feature.hpp index 8812e62169..768ae7ee64 100644 --- a/indexer/feature.hpp +++ b/indexer/feature.hpp @@ -161,14 +161,20 @@ class FeatureType : public FeatureBase public: void Deserialize(feature::LoaderBase * pLoader, TBuffer buffer); - static FeatureType FromXML(string const & xml); - static FeatureType FromXML(editor::XMLFeature const & xml); - - /// Rewrites all but geometry. + /// @name Editor methods. + //@{ + /// Rewrites all but geometry and types. + /// Should be applied to existing features only (in mwm files). void ApplyPatch(editor::XMLFeature const & xml); - void ApplyPatch(osm::EditableMapObject const & ef); + /// Apply changes from UI for edited or newly created features. + /// Replaces all FeatureType's components. + void ReplaceBy(osm::EditableMapObject const & ef); editor::XMLFeature ToXML() const; + /// Creates new feature, including geometry and types. + /// @Note: only nodes (points) are supported at the moment. + bool FromXML(editor::XMLFeature const & xml); + //@} inline void SetID(FeatureID const & id) { m_id = id; } inline FeatureID GetID() const { return m_id; } |