xapian-core  1.4.20
chert_valuelist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2008,2011 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (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_CHERT_VALUELIST_H
22 #define XAPIAN_INCLUDED_CHERT_VALUELIST_H
23 
24 #include "backends/valuelist.h"
25 #include "chert_values.h"
26 
27 class ChertCursor;
28 class ChertDatabase;
29 
33  void operator=(const ChertValueList &);
34 
37 
39 
41 
43 
45 
47  bool update_reader();
48 
49  public:
52  : cursor(NULL), slot(slot_), db(db_) { }
53 
55 
56  Xapian::docid get_docid() const;
57 
59 
60  std::string get_value() const;
61 
62  bool at_end() const;
63 
64  void next();
65 
66  void skip_to(Xapian::docid);
67 
68  bool check(Xapian::docid did);
69 
70  std::string get_description() const;
71 };
72 
73 #endif // XAPIAN_INCLUDED_CHERT_VALUELIST_H
bool check(Xapian::docid did)
Check if the specified docid occurs in this valuestream.
Xapian::valueno get_valueno() const
Return the value slot for the current position/this iterator.
A cursor pointing to a position in a Btree table, for reading several entries in order, or finding approximate matches.
Definition: chert_cursor.h:66
ChertValueList(const ChertValueList &)
Don't allow copying.
Chert class for value streams.
bool update_reader()
Update reader to use the chunk currently pointed to by cursor.
Xapian::docid get_docid() const
Return the docid at the current position.
void operator=(const ChertValueList &)
Don't allow assignment.
void next()
Advance the current position to the next document in the value stream.
Xapian::valueno slot
ChertCursor * cursor
bool at_end() const
Return true if the current position is past the last entry in this list.
Xapian::Internal::intrusive_ptr< const ChertDatabase > db
std::string get_value() const
Return the value at the current position.
ValueChunkReader reader
ChertValueManager class.
ChertValueList(Xapian::valueno slot_, Xapian::Internal::intrusive_ptr< const ChertDatabase > db_)
Abstract base class for value streams.
Definition: valuelist.h:31
std::string get_description() const
Return a string description of this object.
A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree s...
unsigned valueno
The number for a value slot in a document.
Definition: types.h:108
Abstract base class for value streams.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52
void skip_to(Xapian::docid)
Skip forward to the specified docid.