Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index_storage.hpp « drape - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0a5a8714aa595f0cb884b5276051b0a381c0b97d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

#include <cstdint>
#include <vector>

namespace dp
{
class IndexStorage
{
public:
  IndexStorage();
  explicit IndexStorage(std::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:
  std::vector<uint32_t> m_storage;
  uint32_t m_size;

  uint32_t GetStorageSize(uint32_t elementsCount) const;
};
}  // namespace dp