Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsentiy Milchakov <a.milchakov@corp.mail.ru>2016-08-01 16:47:55 +0300
committerArsentiy Milchakov <a.milchakov@corp.mail.ru>2016-08-09 14:31:23 +0300
commit73994023b9a409878496c9a3ca4aee959c532eb4 (patch)
tree6ac5c981ed8e033226740f4888686a76216296c8 /indexer/osm_editor.hpp
parent649832fdc7f26414e62c5d5a4ca4cbc9cadde731 (diff)
first group of tests for editor
Diffstat (limited to 'indexer/osm_editor.hpp')
-rw-r--r--indexer/osm_editor.hpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indexer/osm_editor.hpp b/indexer/osm_editor.hpp
index 0ccfe8f264..a96682c98d 100644
--- a/indexer/osm_editor.hpp
+++ b/indexer/osm_editor.hpp
@@ -21,10 +21,22 @@
#include "std/string.hpp"
#include "std/vector.hpp"
+namespace editor
+{
+class StorageBase;
+}
+
+namespace tests
+{
+class EditorTest;
+}
+
namespace osm
{
class Editor final : public MwmSet::Observer
{
+ friend class tests::EditorTest;
+
Editor();
public:
@@ -175,7 +187,7 @@ public:
private:
// TODO(AlexZ): Synchronize Save call/make it on a separate thread.
/// @returns false if fails.
- bool Save(string const & fullFilePath) const;
+ bool Save() const;
void RemoveFeatureFromStorageIfExists(MwmSet::MwmId const & mwmId, uint32_t index);
void RemoveFeatureFromStorageIfExists(FeatureID const & fid);
/// Notify framework that something has changed and should be redisplayed.
@@ -204,7 +216,7 @@ private:
FeatureTypeInfo const * GetFeatureTypeInfo(MwmSet::MwmId const & mwmId, uint32_t index) const;
FeatureTypeInfo * GetFeatureTypeInfo(MwmSet::MwmId const & mwmId, uint32_t index);
void SaveUploadedInformation(FeatureTypeInfo const & fromUploader);
-
+
// TODO(AlexZ): Synchronize multithread access.
/// Deleted, edited and created features.
map<MwmSet::MwmId, map<uint32_t, FeatureTypeInfo>> m_features;
@@ -227,6 +239,8 @@ private:
shared_ptr<editor::Notes> m_notes;
// Mutex which locks OnMapDeregistered method
mutex m_mapDeregisteredMutex;
+
+ unique_ptr<editor::StorageBase> m_storage;
}; // class Editor
string DebugPrint(Editor::FeatureStatus fs);