xapian-core  1.4.25
glass_metadata.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2005,2007,2008,2009,2011 Olly Betts
5  * Copyright (C) 2008 Lemur Consulting Ltd
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef XAPIAN_INCLUDED_GLASS_METADATA_H
23 #define XAPIAN_INCLUDED_GLASS_METADATA_H
24 
25 #include <xapian/intrusive_ptr.h>
26 #include <xapian/database.h>
27 #include <xapian/types.h>
28 
29 #include "backends/alltermslist.h"
30 #include "glass_table.h"
31 #include "api/termlist.h"
32 
33 #include <string>
34 
35 class GlassCursor;
36 
40 
42  void operator=(const GlassMetadataTermList &);
43 
46 
50 
53  std::string prefix;
54 
55  public:
57  GlassCursor * cursor_, const std::string &prefix_);
58 
60 
66  std::string get_termname() const;
67 
73 
75  TermList * next();
76 
78  TermList * skip_to(const std::string &key);
79 
81  bool at_end() const;
82 };
83 
84 #endif // XAPIAN_INCLUDED_GLASS_METADATA_H
typedefs for Xapian
std::string prefix
The prefix that all returned keys must have.
GlassMetadataTermList(const GlassMetadataTermList &)
Copying is not allowed.
Abstract base class for termlists.
Definition: termlist.h:39
GlassCursor * cursor
A cursor which runs through the postlist table reading metadata keys.
Xapian::Internal::intrusive_ptr< const Xapian::Database::Internal > database
Keep a reference to our database to stop it being deleted.
API for working with Xapian databases.
Xapian::doccount get_termfreq() const
Return the term frequency for the term at the current position.
void operator=(const GlassMetadataTermList &)
Assignment is not allowed.
Abstract base class for iterating all terms in a database.
Btree implementation.
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
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
Abstract base class for termlists.
bool at_end() const
True if we&#39;re off the end of the list.
Abstract base class for iterating all terms in a database.
Definition: alltermslist.h:27
std::string get_termname() const
Returns the current termname.
TermList * next()
Advance to the next term in the list.
TermList * skip_to(const std::string &key)
Advance to the first key which is >= key.