Fix @file doc comments which don't match filename
[xapian.git] / xapian-core / backends / multi / multi_termlist.cc
blobd9e6b631bcc7325d98d25e52834dfbb10c591e56
1 /** @file multi_termlist.cc
2 * @brief Adapter class for a TermList in a multidatabase
3 */
4 /* Copyright (C) 2007,2008,2009,2011,2017 Olly Betts
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.
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 "multi_termlist.h"
25 #include <xapian/database.h>
27 #include "backends/databaseinternal.h"
28 #include "backends/multi.h"
29 #include "omassert.h"
31 using namespace std;
33 MultiTermList::MultiTermList(const Xapian::Database::Internal* db_,
34 TermList* real_termlist_)
35 : real_termlist(real_termlist_), db(db_)
39 MultiTermList::~MultiTermList()
41 delete real_termlist;
44 Xapian::termcount
45 MultiTermList::get_approx_size() const
47 return real_termlist->get_approx_size();
50 string
51 MultiTermList::get_termname() const
53 return real_termlist->get_termname();
56 Xapian::termcount
57 MultiTermList::get_wdf() const
59 return real_termlist->get_wdf();
62 Xapian::doccount
63 MultiTermList::get_termfreq() const
65 Xapian::doccount result;
66 db->get_freqs(real_termlist->get_termname(), &result, NULL);
67 return result;
70 TermList *
71 MultiTermList::next()
73 return real_termlist->next();
76 TermList *
77 MultiTermList::skip_to(const std::string &term)
79 return real_termlist->skip_to(term);
82 bool
83 MultiTermList::at_end() const
85 return real_termlist->at_end();
88 Xapian::termcount
89 MultiTermList::positionlist_count() const
91 return real_termlist->positionlist_count();
94 PositionList*
95 MultiTermList::positionlist_begin() const
97 return real_termlist->positionlist_begin();