diff --git a/indexer/classificator_loader.cpp b/indexer/classificator_loader.cpp index 8160695d09..88b6104c7f 100644 --- a/indexer/classificator_loader.cpp +++ b/indexer/classificator_loader.cpp @@ -10,10 +10,10 @@ namespace classificator { - void Read(file_t const & rules, - file_t const & classificator, - file_t const & visibility, - file_t const & types) + void Read(ReaderType const & rules, + ReaderType const & classificator, + ReaderType const & visibility, + ReaderType const & types) { // LOG(LINFO, ("Reading drawing rules")); ReaderPtrStream rulesS(rules); @@ -42,7 +42,7 @@ namespace classificator void ReadVisibility(string const & fPath) { string buffer; - file_t(new FileReader(fPath)).ReadAsString(buffer); + ReaderType(new FileReader(fPath)).ReadAsString(buffer); classif().ReadVisibility(buffer); } diff --git a/indexer/classificator_loader.hpp b/indexer/classificator_loader.hpp index 45376a0f07..8b14dbb531 100644 --- a/indexer/classificator_loader.hpp +++ b/indexer/classificator_loader.hpp @@ -7,12 +7,12 @@ namespace classificator { - typedef ReaderPtr file_t; + typedef ReaderPtr ReaderType; - void Read(file_t const & rules, - file_t const & classificator, - file_t const & visibility, - file_t const & types); + void Read(ReaderType const & rules, + ReaderType const & classificator, + ReaderType const & visibility, + ReaderType const & types); void ReadVisibility(string const & fPath); /// This function used only in unit test to get any valid type value for feature testing. diff --git a/indexer/drawing_rules.cpp b/indexer/drawing_rules.cpp index ef366f8f34..f008bdc6b3 100644 --- a/indexer/drawing_rules.cpp +++ b/indexer/drawing_rules.cpp @@ -57,22 +57,22 @@ namespace drule { //@{ class assign_element { - attrs_map_t const & m_attrs; + AttrsMapType const & m_attrs; string * m_keys; public: - assign_element(attrs_map_t const & attrs, string * keys) : m_attrs(attrs), m_keys(keys) {} + assign_element(AttrsMapType const & attrs, string * keys) : m_attrs(attrs), m_keys(keys) {} template void operator() (T & t, int n) { - attrs_map_t::const_iterator i = m_attrs.find(m_keys[n]); + AttrsMapType::const_iterator i = m_attrs.find(m_keys[n]); if (i != m_attrs.end()) t = get_value(i->second); } }; template - void parse_tuple(Tuple & t, attrs_map_t const & attrs, string (&keys)[N]) + void parse_tuple(Tuple & t, AttrsMapType const & attrs, string (&keys)[N]) { STATIC_ASSERT ( N == tuple_length::value ); assign_element toDo(attrs, keys); @@ -81,7 +81,7 @@ namespace drule { //@} /// main function for rule creation - template T * create_rule(attrs_map_t const & attrs) + template T * create_rule(AttrsMapType const & attrs) { T * p = new T(); parse_tuple(p->m_params, attrs, T::arrKeys); @@ -782,7 +782,7 @@ void RulesHolder::SetParseFile(char const * fPath, int scale) } /// parse pairs (:;) for a specified 'class' attribute obj in file buffer -void RulesHolder::PushAttributes(string objClass, attrs_map_t & attrs) +void RulesHolder::PushAttributes(string objClass, AttrsMapType & attrs) { objClass = '.' + objClass; @@ -834,13 +834,13 @@ namespace char const * arrClassTags[] = { "class", "mask-class" }; } -void RulesHolder::CreateRules(string const & name, uint8_t type, attrs_map_t const & attrs, vector & v) +void RulesHolder::CreateRules(string const & name, uint8_t type, AttrsMapType const & attrs, vector & v) { bool added = false; for (size_t i = 0; i < ARRAY_SIZE(arrClassTags); ++i) { - attrs_map_t::const_iterator it = attrs.find(arrClassTags[i]); + AttrsMapType::const_iterator it = attrs.find(arrClassTags[i]); if (it != attrs.end()) { added = true; @@ -855,7 +855,7 @@ void RulesHolder::CreateRules(string const & name, uint8_t type, attrs_map_t con Key RulesHolder::CreateRuleImpl1(string const & name, uint8_t type, string const & clValue, - attrs_map_t const & attrs, + AttrsMapType const & attrs, bool isMask) { #ifdef DEBUG @@ -865,10 +865,10 @@ Key RulesHolder::CreateRuleImpl1(string const & name, } #endif - attrs_map_t a; + AttrsMapType a; strings::Tokenize(clValue, " \t", bind(&RulesHolder::PushAttributes, this, _1, ref(a))); - for (attrs_map_t::const_iterator i = attrs.begin(); i != attrs.end(); ++i) + for (AttrsMapType::const_iterator i = attrs.begin(); i != attrs.end(); ++i) if (!strings::IsInArray(arrClassTags, i->first)) a[i->first] = i->second; @@ -878,7 +878,7 @@ Key RulesHolder::CreateRuleImpl1(string const & name, // patch the tunnel draw rules -> make line draw rule if (name == "tunnel") { - attrs_map_t::iterator i = a.find("width"); + AttrsMapType::iterator i = a.find("width"); if (i != a.end()) { a["stroke-width"] = i->second; @@ -894,7 +894,7 @@ Key RulesHolder::CreateRuleImpl1(string const & name, Key RulesHolder::CreateRuleImpl2(string const & name, uint8_t rType, string const & clName, - attrs_map_t const & attrs) + AttrsMapType const & attrs) { BaseRule * pRule = 0; int type = -1; diff --git a/indexer/drawing_rules.hpp b/indexer/drawing_rules.hpp index 8ebc6a821c..ebab95270a 100644 --- a/indexer/drawing_rules.hpp +++ b/indexer/drawing_rules.hpp @@ -14,7 +14,7 @@ class FileWriterStream; namespace drule { - typedef map attrs_map_t; + typedef map AttrsMapType; class BaseRule { @@ -120,10 +120,12 @@ namespace drule int m_currScale; //@} - void PushAttributes(string objClass, attrs_map_t & attrs); + void PushAttributes(string objClass, AttrsMapType & attrs); - Key CreateRuleImpl1(string const & name, uint8_t type, string const & clValue, attrs_map_t const & attrs, bool isMask); - Key CreateRuleImpl2(string const & name, uint8_t type, string const & clName, attrs_map_t const & attrs); + Key CreateRuleImpl1(string const & name, uint8_t type, string const & clValue, + AttrsMapType const & attrs, bool isMask); + Key CreateRuleImpl2(string const & name, uint8_t type, string const & clName, + AttrsMapType const & attrs); public: ~RulesHolder(); @@ -137,7 +139,8 @@ namespace drule void SetParseFile(char const * fPath, int scale); - void CreateRules(string const & name, uint8_t type, attrs_map_t const & attrs, vector & v); + void CreateRules(string const & name, uint8_t type, + AttrsMapType const & attrs, vector & v); BaseRule const * Find(Key const & k) const;