diff options
author | vng <viktor.govako@gmail.com> | 2011-08-25 08:47:17 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:22:21 +0300 |
commit | 23894576db1c9c13ba55d9173488202a050a0d3a (patch) | |
tree | e8c7f3572c476271e431b6b7166595bf83565880 /indexer/data_header.hpp | |
parent | b9df96e89b57666178aada45c4c25eece8f8d756 (diff) |
[Refactoring] Factor out feature loading routine to separate instance.
Diffstat (limited to 'indexer/data_header.hpp')
-rw-r--r-- | indexer/data_header.hpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/indexer/data_header.hpp b/indexer/data_header.hpp index 2726508688..83fe37e7a5 100644 --- a/indexer/data_header.hpp +++ b/indexer/data_header.hpp @@ -6,15 +6,13 @@ #include "../std/array.hpp" -#include "../base/start_mem_debug.hpp" - class ModelReaderPtr; class FileWriter; +class FilesContainerR; namespace feature { - /// All file sizes are in bytes class DataHeader { serial::CodingParams m_codingParams; @@ -24,10 +22,6 @@ namespace feature array<uint8_t, 4> m_scales; public: - DataHeader(); - - /// Zero all fields - void Reset(); void SetCodingParams(serial::CodingParams const & params) { m_codingParams = params; } serial::CodingParams const & GetCodingParams() const { return m_codingParams; } @@ -36,16 +30,19 @@ namespace feature void SetBounds(m2::RectD const & r); void SetScales(int * arr); - size_t GetScalesCount() const { return m_scales.size(); } - int GetScale(int i) const { return m_scales[i]; } + + inline size_t GetScalesCount() const { return m_scales.size(); } + inline int GetScale(int i) const { return m_scales[i]; } + inline int GetLastScale() const { return GetScale(GetScalesCount() - 1); } + pair<int, int> GetScaleRange() const; /// @name Serialization //@{ void Save(FileWriter & w) const; void Load(ModelReaderPtr const & r); + + void LoadForVersion(FilesContainerR const & cont); //@} }; } - -#include "../base/stop_mem_debug.hpp" |