[python3] Simplify generated wrapper post-processing
[xapian.git] / xapian-core / api / emptypostlist.cc
blobcd83a46c3b8a3e5738dd7ea4802f94a50a86b230
1 /** @file emptypostlist.cc
2 * @brief A PostList which contains no entries.
3 */
4 /* Copyright (C) 2009,2010,2011,2015,2017 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 #include <config.h>
23 #include "emptypostlist.h"
25 #include "omassert.h"
27 using namespace std;
29 Xapian::doccount
30 EmptyPostList::get_termfreq_min() const
32 return 0;
35 Xapian::doccount
36 EmptyPostList::get_termfreq_max() const
38 return 0;
41 Xapian::doccount
42 EmptyPostList::get_termfreq_est() const
44 return 0;
47 // OP_WILDCARD which expands to no terms becomes EmptyPostList, and this is
48 // needed if that is used under OP_SYNONYM.
49 TermFreqs
50 EmptyPostList::get_termfreq_est_using_stats(const Xapian::Weight::Internal &) const
52 return TermFreqs();
55 Xapian::docid
56 EmptyPostList::get_docid() const
58 Assert(false);
59 return 0;
62 double
63 EmptyPostList::get_weight(Xapian::termcount,
64 Xapian::termcount) const
66 Assert(false);
67 return 0;
70 bool
71 EmptyPostList::at_end() const
73 return true;
76 double
77 EmptyPostList::recalc_maxweight()
79 return 0;
82 PostList *
83 EmptyPostList::next(double)
85 return NULL;
88 PostList *
89 EmptyPostList::skip_to(Xapian::docid, double)
91 return NULL;
94 string
95 EmptyPostList::get_description() const
97 return "EmptyPostList";