diff options
author | vng <viktor.govako@gmail.com> | 2012-09-25 20:17:24 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:43:52 +0300 |
commit | dfb2db05de730607a7496e2f9d89424b49d5ae30 (patch) | |
tree | e72c00966bec2bf5eae942bb3860df414675ec67 /indexer | |
parent | 49a7bfc73de52fa58ea972f7281ff8c970f623c8 (diff) |
Get raw types in Framework::GetAddressInfo if no types matched in categories.
Diffstat (limited to 'indexer')
-rw-r--r-- | indexer/classificator.cpp | 13 | ||||
-rw-r--r-- | indexer/classificator.hpp | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/indexer/classificator.cpp b/indexer/classificator.cpp index 1666b22299..4cb9711ecb 100644 --- a/indexer/classificator.cpp +++ b/indexer/classificator.cpp @@ -552,3 +552,16 @@ void Classificator::Clear() { *this = Classificator(); } + +string Classificator::GetReadableObjectName(uint32_t type) const +{ + string s = classif().GetFullObjectName(type); + + // remove ending dummy symbol + ASSERT ( !s.empty(), () ); + s.resize(s.size()-1); + + // replace separator + replace(s.begin(), s.end(), '|', '-'); + return s; +} diff --git a/indexer/classificator.hpp b/indexer/classificator.hpp index 930dc59ae9..d77e256614 100644 --- a/indexer/classificator.hpp +++ b/indexer/classificator.hpp @@ -261,6 +261,9 @@ public: ClassifObject const * GetObject(uint32_t type) const; string GetFullObjectName(uint32_t type) const; //@} + + /// @return Object name to show in UI (not for debug purposes). + string GetReadableObjectName(uint32_t type) const; }; Classificator & classif(); |