Lucene++ - a full-featured, c++ search engine
API Documentation


 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OpenBitSetIterator.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6 
7 #ifndef OPENBITSETITERATOR_H
8 #define OPENBITSETITERATOR_H
9 
10 #include "DocIdSetIterator.h"
11 
12 namespace Lucene {
13 
17 class LPPAPI OpenBitSetIterator : public DocIdSetIterator {
18 public:
19  OpenBitSetIterator(const OpenBitSetPtr& bitSet);
20  OpenBitSetIterator(LongArray bits, int32_t numWords);
21  virtual ~OpenBitSetIterator();
22 
24 
25 protected:
26  LongArray arr;
27  int32_t words;
28  int32_t i;
29  int64_t word;
30  int32_t wordShift;
31  int32_t indexArray;
32  int32_t curDocId;
33 
38  static const int32_t bitlist[];
39 
40 public:
41  virtual int32_t nextDoc();
42  virtual int32_t advance(int32_t target);
43  virtual int32_t docID();
44 
45 protected:
47  void shift();
48 };
49 
50 }
51 
52 #endif
int32_t curDocId
Definition: OpenBitSetIterator.h:32
boost::shared_ptr< OpenBitSet > OpenBitSetPtr
Definition: LuceneTypes.h:543
This abstract class defines methods to iterate over a set of non-decreasing doc ids. Note that this class assumes it iterates on doc Ids, and therefore NO_MORE_DOCS is set to { NO_MORE_DOCS} in order to be used as a sentinel object. Implementations of this class are expected to consider INT_MAX as an invalid value.
Definition: DocIdSetIterator.h:17
int32_t words
Definition: OpenBitSetIterator.h:27
int32_t wordShift
Definition: OpenBitSetIterator.h:30
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Definition: AbstractAllTermDocs.h:12
int32_t indexArray
Definition: OpenBitSetIterator.h:31
An iterator to iterate over set bits in an OpenBitSet. This is faster than nextSetBit() for iterating...
Definition: OpenBitSetIterator.h:17
int64_t word
Definition: OpenBitSetIterator.h:29
int32_t i
Definition: OpenBitSetIterator.h:28

clucene.sourceforge.net