diff options
author | vng <viktor.govako@gmail.com> | 2011-11-25 00:28:17 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:28:44 +0300 |
commit | 65530f86918698ec5cc6dbdd408e6295c28f7c1a (patch) | |
tree | 2b95e76f79c16a60b38e0b1a95ac72bebadfba8f /indexer/drawing_rules.hpp | |
parent | c11367ac7accbbff694befc754132c3da8b76540 (diff) |
Avoid overhead in classificator reading (read to string -> istringstream).
Add reading of binary proto drawing rules.
Diffstat (limited to 'indexer/drawing_rules.hpp')
-rw-r--r-- | indexer/drawing_rules.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indexer/drawing_rules.hpp b/indexer/drawing_rules.hpp index 15b66cfb86..61c97f3a4c 100644 --- a/indexer/drawing_rules.hpp +++ b/indexer/drawing_rules.hpp @@ -8,6 +8,7 @@ #include "../std/vector.hpp" #include "../std/array.hpp" #include "../std/string.hpp" +#include "../std/fstream.hpp" class LineDefProto; @@ -119,6 +120,9 @@ namespace drule void LoadFromTextProto(string const & buffer); + static void SaveToBinaryProto(string const & buffer, ostream & s); + void LoadFromBinaryProto(istream & s); + template <class ToDo> void ForEachRule(ToDo toDo) { for (rules_map_t::const_iterator i = m_rules.begin(); i != m_rules.end(); ++i) |