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:
authorvng <viktor.govako@gmail.com>2011-08-25 12:53:47 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:22:22 +0300
commit91909c81267e3b38e95005923a7b7a98d72a0d79 (patch)
treee35dd1f440700ac307d6f89286f26915d24224bf /indexer/interval_index.hpp
parentcd7d41afd362028fb1d29a5f6e35a8365096370c (diff)
[Support Old Format] Add polymorphic index usage.
Diffstat (limited to 'indexer/interval_index.hpp')
-rw-r--r--indexer/interval_index.hpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indexer/interval_index.hpp b/indexer/interval_index.hpp
index fa62a0700d..312cb095a4 100644
--- a/indexer/interval_index.hpp
+++ b/indexer/interval_index.hpp
@@ -1,18 +1,23 @@
#pragma once
+#include "interval_index_iface.hpp"
+
#include "../coding/endianness.hpp"
#include "../coding/byte_stream.hpp"
#include "../coding/reader.hpp"
#include "../coding/varint.hpp"
+
#include "../base/assert.hpp"
#include "../base/base.hpp"
#include "../base/bits.hpp"
#include "../base/buffer_vector.hpp"
#include "../base/macros.hpp"
+
#include "../std/algorithm.hpp"
#include "../std/memcpy.hpp"
#include "../std/static_assert.hpp"
-class IntervalIndexBase
+
+class IntervalIndexBase : public IntervalIndexIFace
{
public:
#pragma pack(push, 1)
@@ -38,9 +43,9 @@ public:
template <class ReaderT>
class IntervalIndex : public IntervalIndexBase
{
+ typedef IntervalIndexBase base_t;
public:
-
- class Query
+ class Query : public base_t::QueryIFace
{
public:
void Clear() {}
@@ -83,6 +88,11 @@ public:
ForEach(f, beg, end, query);
}
+ virtual void DoForEach(FunctionT const & f, uint64_t beg, uint64_t end, QueryIFace & /*query*/)
+ {
+ ForEach(f, beg, end);
+ }
+
private:
template <typename F>