xapian-core  1.4.26
multivaluelist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2008,2009 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_MULTIVALUELIST_H
22 #define XAPIAN_INCLUDED_MULTIVALUELIST_H
23 
24 #include "valuelist.h"
25 
26 #include "database.h"
27 
28 #include <string>
29 #include <vector>
30 
31 struct SubValueList;
32 
34 class MultiValueList : public ValueList {
36  void operator=(const MultiValueList &);
37 
40 
43 
45  std::vector<SubValueList *> valuelists;
46 
49 
50  size_t multiplier;
51 
52  public:
55  Xapian::valueno slot_);
56 
59 
61  Xapian::docid get_docid() const;
62 
64  std::string get_value() const;
65 
68 
70  bool at_end() const;
71 
78  void next();
79 
85  void skip_to(Xapian::docid);
86 
105  bool check(Xapian::docid did);
106 
108  std::string get_description() const;
109 };
110 
111 #endif // XAPIAN_INCLUDED_MULTIVALUELIST_H
Xapian::docid current_docid
Current docid (or 0 if we haven&#39;t started yet).
bool at_end() const
Return true if the current position is past the last entry in this list.
Xapian::valueno slot
The value slot we&#39;re iterating over.
Xapian::valueno get_valueno() const
Return the value slot for the current position/this iterator.
void operator=(const MultiValueList &)
Don&#39;t allow assignment.
MultiValueList(const MultiValueList &)
Don&#39;t allow copying.
Xapian::docid get_docid() const
Return the docid at the current position.
std::string get_value() const
Return the value at the current position.
Class for merging ValueList objects from subdatabases.
bool check(Xapian::docid did)
Check if the specified docid occurs in this valuestream.
void skip_to(Xapian::docid)
Skip forward to the specified docid.
~MultiValueList()
Destructor.
Abstract base class for value streams.
Definition: valuelist.h:31
void next()
Advance the current position to the next document in the value stream.
std::string get_description() const
Return a string description of this object.
unsigned valueno
The number for a value slot in a document.
Definition: types.h:108
Abstract base class for value streams.
std::vector< SubValueList * > valuelists
Vector of sub-valuelists which we use as a heap.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52