00001 00004 /* Copyright (C) 2009,2010 Olly Betts 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License as 00008 * published by the Free Software Foundation; either version 2 of the 00009 * License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #include <config.h> 00022 00023 #include "emptypostlist.h" 00024 00025 #include "omassert.h" 00026 00027 using namespace std; 00028 00029 Xapian::doccount 00030 EmptyPostList::get_termfreq_min() const 00031 { 00032 return 0; 00033 } 00034 00035 Xapian::doccount 00036 EmptyPostList::get_termfreq_max() const 00037 { 00038 return 0; 00039 } 00040 00041 Xapian::doccount 00042 EmptyPostList::get_termfreq_est() const 00043 { 00044 return 0; 00045 } 00046 00047 Xapian::weight 00048 EmptyPostList::get_maxweight() const 00049 { 00050 return 0; 00051 } 00052 00053 Xapian::docid 00054 EmptyPostList::get_docid() const 00055 { 00056 Assert(false); 00057 return 0; 00058 } 00059 00060 Xapian::termcount 00061 EmptyPostList::get_doclength() const 00062 { 00063 return Xapian::termcount(EmptyPostList::get_docid()); 00064 } 00065 00066 Xapian::weight 00067 EmptyPostList::get_weight() const 00068 { 00069 Assert(false); 00070 return 0; 00071 } 00072 00073 bool 00074 EmptyPostList::at_end() const 00075 { 00076 return true; 00077 } 00078 00079 Xapian::weight 00080 EmptyPostList::recalc_maxweight() 00081 { 00082 return EmptyPostList::get_maxweight(); 00083 } 00084 00085 PostList * 00086 EmptyPostList::next(Xapian::weight) 00087 { 00088 return NULL; 00089 } 00090 00091 PostList * 00092 EmptyPostList::skip_to(Xapian::docid, Xapian::weight) 00093 { 00094 return NULL; 00095 } 00096 00097 string 00098 EmptyPostList::get_description() const 00099 { 00100 return "EmptyPostList"; 00101 }