00001 00004 /* Copyright (C) 2007,2008 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 #ifndef XAPIAN_INCLUDED_VALUELIST_H 00022 #define XAPIAN_INCLUDED_VALUELIST_H 00023 00024 #include <string> 00025 00026 #include <xapian/base.h> 00027 #include <xapian/types.h> 00028 #include <xapian/valueiterator.h> 00029 00031 class Xapian::ValueIterator::Internal : public Xapian::Internal::RefCntBase { 00033 void operator=(const Internal &); 00034 00036 Internal(const Internal &); 00037 00038 protected: 00040 Internal() { } 00041 00042 public: 00046 virtual ~Internal(); 00047 00049 virtual Xapian::docid get_docid() const = 0; 00050 00052 virtual std::string get_value() const = 0; 00053 00055 virtual Xapian::valueno get_valueno() const = 0; 00056 00058 virtual bool at_end() const = 0; 00059 00066 virtual void next() = 0; 00067 00073 virtual void skip_to(Xapian::docid) = 0; 00074 00093 virtual bool check(Xapian::docid did); 00094 00096 virtual std::string get_description() const = 0; 00097 }; 00098 00099 // In the external API headers, this class is Xapian::ValueIterator::Internal, 00100 // but in the library code it's known as "ValueList" in most places. 00101 typedef Xapian::ValueIterator::Internal ValueList; 00102 00103 #endif // XAPIAN_INCLUDED_VALUELIST_H