xapian-core  1.4.27
glass_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, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_GLASS_VALUELIST_H
22 #define XAPIAN_INCLUDED_GLASS_VALUELIST_H
23 
24 #include "backends/valuelist.h"
25 #include "glass_values.h"
26 
27 class GlassCursor;
28 class GlassDatabase;
29 
33  void operator=(const GlassValueList &);
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_GLASS_VALUELIST_H
void skip_to(Xapian::docid)
Skip forward to the specified docid.
void next()
Advance the current position to the next document in the value stream.
GlassValueList(Xapian::valueno slot_, Xapian::Internal::intrusive_ptr< const GlassDatabase > db_)
Xapian::valueno slot
bool update_reader()
Update reader to use the chunk currently pointed to by cursor.
Glass class for value streams.
void operator=(const GlassValueList &)
Don&#39;t allow assignment.
std::string get_value() const
Return the value at the current position.
A backend designed for efficient indexing and retrieval, using compressed posting lists and a btree s...
A cursor pointing to a position in a Btree table, for reading several entries in order, or finding approximate matches.
Definition: glass_cursor.h:147
Xapian::Internal::intrusive_ptr< const GlassDatabase > db
std::string get_description() const
Return a string description of this object.
Abstract base class for value streams.
Definition: valuelist.h:31
GlassValueManager class.
Xapian::docid get_docid() const
Return the docid at the current position.
unsigned valueno
The number for a value slot in a document.
Definition: types.h:108
GlassValueList(const GlassValueList &)
Don&#39;t allow copying.
bool at_end() const
Return true if the current position is past the last entry in this list.
Glass::ValueChunkReader reader
Abstract base class for value streams.
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52
GlassCursor * cursor
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.