xapian-core  1.4.27
alltermslist.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 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_ALLTERMSLIST_H
22 #define XAPIAN_INCLUDED_ALLTERMSLIST_H
23 
24 #include "api/termlist.h"
25 
27 class AllTermsList : public TermList {
29  void operator=(const AllTermsList &);
30 
32  AllTermsList(const AllTermsList &);
33 
34  protected:
37 
38  public:
40  virtual Xapian::termcount get_approx_size() const;
41 
43  virtual std::string get_termname() const = 0;
44 
50  virtual Xapian::termcount get_wdf() const;
51 
53  virtual Xapian::doccount get_termfreq() const = 0;
54 
56  virtual TermList *next() = 0;
57 
63  virtual TermList *skip_to(const std::string &term) = 0;
64 
66  virtual bool at_end() const = 0;
67 
73  virtual Xapian::termcount positionlist_count() const;
74 
81 };
82 
83 #endif // XAPIAN_INCLUDED_ALLTERMSLIST_H
virtual Xapian::termcount get_approx_size() const
Return approximate size of this termlist.
Definition: alltermslist.cc:32
virtual TermList * next()=0
Advance the current position to the next term in the termlist.
Abstract base class for termlists.
Definition: termlist.h:39
virtual Xapian::termcount positionlist_count() const
Return true if the current position is past the last term in this list.
Definition: alltermslist.cc:46
void operator=(const AllTermsList &)
Don't allow assignment.
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
virtual Xapian::doccount get_termfreq() const =0
Return the term frequency for the term at the current position.
virtual bool at_end() const =0
Return true if the current position is past the last term in this list.
Class for iterating over term positions.
AllTermsList()
Only constructable as a base class for derived classes.
Definition: alltermslist.h:36
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
virtual Xapian::termcount get_wdf() const
Return the wdf for the term at the current position.
Definition: alltermslist.cc:40
Abstract base class for termlists.
virtual std::string get_termname() const =0
Return the termname at the current position.
Abstract base class for iterating all terms in a database.
Definition: alltermslist.h:27
virtual TermList * skip_to(const std::string &term)=0
Skip forward to the specified term.
virtual Xapian::PositionIterator positionlist_begin() const
Return a PositionIterator for the current position.
Definition: alltermslist.cc:52