Website now in git not CVS
[xapian.git] / xapian-core / api / emptypostlist.h
blob4be46f5590922eb320156d41d618edd53fba6cf9
1 /** @file emptypostlist.h
2 * @brief A PostList which contains no entries.
3 */
4 /* Copyright (C) 2009,2011,2015 Olly Betts
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.
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.
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
21 #ifndef XAPIAN_INCLUDED_EMPTYPOSTLIST_H
22 #define XAPIAN_INCLUDED_EMPTYPOSTLIST_H
24 #include "postlist.h"
26 /// A PostList which contains no entries.
27 class EmptyPostList : public PostList {
28 /// Don't allow assignment.
29 void operator=(const EmptyPostList &);
31 /// Don't allow copying.
32 EmptyPostList(const EmptyPostList &);
34 public:
35 /// Constructor.
36 EmptyPostList() { }
38 Xapian::doccount get_termfreq_min() const;
39 Xapian::doccount get_termfreq_max() const;
40 Xapian::doccount get_termfreq_est() const;
42 TermFreqs get_termfreq_est_using_stats(const Xapian::Weight::Internal &) const;
44 double get_maxweight() const;
45 Xapian::docid get_docid() const;
46 Xapian::termcount get_doclength() const;
47 Xapian::termcount get_unique_terms() const;
48 double get_weight() const;
49 bool at_end() const;
50 double recalc_maxweight();
52 PostList * next(double w_min);
53 PostList * skip_to(Xapian::docid, double w_min);
55 std::string get_description() const;
58 #endif // XAPIAN_INCLUDED_EMPTYPOSTLIST_H