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:
authorSergey Yershov <syershov@maps.me>2018-05-30 20:06:37 +0300
committermpimenov <mpimenov@users.noreply.github.com>2018-06-01 16:17:52 +0300
commitc1ee243c976fc9adfbb71dc4cdf46dfc1333ec4f (patch)
tree3bde0d2d7a5b0583a4592c773fa241797f78de1e /indexer/new_feature_categories.hpp
parentbabe8899b5eeb36f6c3b500946ca15cb08c086d8 (diff)
[indexer][editor] Move some code from indexer to editor
Diffstat (limited to 'indexer/new_feature_categories.hpp')
-rw-r--r--indexer/new_feature_categories.hpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/indexer/new_feature_categories.hpp b/indexer/new_feature_categories.hpp
deleted file mode 100644
index f236e0802f..0000000000
--- a/indexer/new_feature_categories.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-#pragma once
-
-#include "indexer/categories_index.hpp"
-
-#include "editor/editor_config.hpp"
-
-#include "base/macros.hpp"
-
-#include "std/cstdint.hpp"
-#include "std/map.hpp"
-#include "std/string.hpp"
-#include "std/utility.hpp"
-#include "std/vector.hpp"
-
-namespace osm
-{
-// This class holds an index of categories that can be set for a newly added feature.
-class NewFeatureCategories
-{
-public:
- using TName = pair<string, uint32_t>;
- using TNames = vector<TName>;
-
- NewFeatureCategories(editor::EditorConfig const & config);
-
- NewFeatureCategories(NewFeatureCategories && other);
-
- NewFeatureCategories() = default;
-
- NewFeatureCategories & operator=(NewFeatureCategories && other) = default;
-
- // Adds all known synonyms in language |lang| for all categories that
- // can be applied to a newly added feature.
- // If one language is added more than once, all the calls except for the
- // first one are ignored.
- // If |lang| is not supported, "en" is used.
- void AddLanguage(string lang);
-
- // Returns names (in language |queryLang|) and types of categories that have a synonym containing
- // the substring |query| (in any language that was added before).
- // If |lang| is not supported, "en" is used.
- // The returned list is sorted.
- TNames Search(string const & query, string lang) const;
-
- // Returns all registered names of categories in language |lang| and
- // types corresponding to these names. The language must have been added before.
- // If |lang| is not supported, "en" is used.
- // The returned list is sorted.
- TNames const & GetAllCategoryNames(string const & lang) const;
-
-private:
- indexer::CategoriesIndex m_index;
- vector<uint32_t> m_types;
- map<string, TNames> m_categoriesByLang;
-
- DISALLOW_COPY(NewFeatureCategories);
-};
-} // namespace osm