backends/flint/flint_metadata.h

Go to the documentation of this file.
00001 
00004 /* Copyright (C) 2005,2007,2008 Olly Betts
00005  * Copyright (C) 2008 Lemur Consulting Ltd
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00020  */
00021 
00022 #ifndef XAPIAN_INCLUDED_FLINT_METADATA_H
00023 #define XAPIAN_INCLUDED_FLINT_METADATA_H
00024 
00025 #include <xapian/base.h>
00026 #include <xapian/database.h>
00027 #include <xapian/types.h>
00028 
00029 #include "alltermslist.h"
00030 #include "flint_table.h"
00031 #include "omdebug.h"
00032 #include "termlist.h"
00033 
00034 #include <string>
00035 
00036 class FlintCursor;
00037 
00038 class FlintMetadataTermList : public AllTermsList {
00040     FlintMetadataTermList(const FlintMetadataTermList &);
00041 
00043     void operator=(const FlintMetadataTermList &);
00044 
00046     Xapian::Internal::RefCntPtr<const Xapian::Database::Internal> database;
00047 
00050     FlintCursor * cursor;
00051 
00054     std::string prefix;
00055 
00056   public:
00057     FlintMetadataTermList(Xapian::Internal::RefCntPtr<const Xapian::Database::Internal> database_,
00058                           FlintCursor * cursor_, const std::string &prefix_);
00059 
00060     ~FlintMetadataTermList();
00061 
00067     std::string get_termname() const;
00068 
00073     Xapian::doccount get_termfreq() const;
00074 
00079     Xapian::termcount get_collection_freq() const;
00080 
00082     TermList * next();
00083 
00085     TermList * skip_to(const std::string &tname);
00086 
00088     bool at_end() const;
00089 };
00090 
00091 #endif // XAPIAN_INCLUDED_FLINT_METADATA_H

Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.