xapian-core  2.0.0
honey_valuelist.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2008,2009,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, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef XAPIAN_INCLUDED_HONEY_VALUELIST_H
22 #define XAPIAN_INCLUDED_HONEY_VALUELIST_H
23 
24 #include "backends/valuelist.h"
25 #include "honey_values.h"
26 
27 class HoneyCursor;
28 class HoneyDatabase;
29 
33  void operator=(const HoneyValueList&);
34 
37 
38  HoneyCursor* cursor = nullptr;
39 
41 
43 
45 
47  bool update_reader();
48 
49  public:
51  : slot(slot_), db(db_) { }
52 
54 
55  Xapian::docid get_docid() const;
56 
58 
59  std::string get_value() const;
60 
61  bool at_end() const;
62 
63  void next();
64 
65  void skip_to(Xapian::docid);
66 
67  std::string get_description() const;
68 };
69 
70 #endif // XAPIAN_INCLUDED_HONEY_VALUELIST_H
Database using honey backend.
Honey class for value streams.
std::string get_value() const
Return the value at the current position.
Honey::ValueChunkReader reader
Xapian::valueno slot
Xapian::valueno get_valueno() const
Return the value slot for the current position/this iterator.
HoneyValueList(Xapian::valueno slot_, const HoneyDatabase *db_)
void skip_to(Xapian::docid)
Skip forward to the specified docid.
HoneyValueList(const HoneyValueList &)
Don't allow copying.
Xapian::Internal::intrusive_ptr< const HoneyDatabase > db
bool at_end() const
Return true if the current position is past the last entry in this list.
void next()
Advance the current position to the next document in the value stream.
Xapian::docid get_docid() const
Return the docid at the current position.
std::string get_description() const
Return a string description of this object.
void operator=(const HoneyValueList &)
Don't allow assignment.
HoneyCursor * cursor
bool update_reader()
Update reader to use the chunk currently pointed to by cursor.
Abstract base class for value streams.
Definition: valuelist.h:31
HoneyValueManager class.
unsigned valueno
The number for a value slot in a document.
Definition: types.h:90
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:51
Abstract base class for value streams.