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:
authorr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-06-22 15:38:38 +0300
committerr.kuznetsov <r.kuznetsov@corp.mail.ru>2015-11-30 16:09:25 +0300
commitf243d859947c05a42d94e715d9f831bf3f88a1e0 (patch)
treebc44237cf7e22431b38beca83d7195ebbb9ced73 /drape/index_storage.hpp
parent7508e58bcd6f2cc4988940013972afe029a8a831 (diff)
Added supporting of 32-bit indices
Diffstat (limited to 'drape/index_storage.hpp')
-rw-r--r--drape/index_storage.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/drape/index_storage.hpp b/drape/index_storage.hpp
new file mode 100644
index 0000000000..6ae9d8c3a7
--- /dev/null
+++ b/drape/index_storage.hpp
@@ -0,0 +1,29 @@
+#pragma once
+
+#include "std/vector.hpp"
+
+namespace dp
+{
+
+class IndexStorage
+{
+public:
+ IndexStorage() = default;
+ IndexStorage(vector<uint32_t> && initial);
+
+ uint32_t Size() const;
+ void Resize(uint32_t size);
+
+ void * GetRaw(uint32_t offsetInElements = 0);
+ void const * GetRawConst() const;
+
+ static bool IsSupported32bit();
+ static uint32_t SizeOfIndex();
+
+private:
+ vector<uint16_t> m_storage16bit;
+ vector<uint32_t> m_storage32bit;
+};
+
+
+} // namespace dp