00001 00004 /* Copyright (C) 2007,2008,2009 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_DOCUMENTVALUELIST_H 00022 #define XAPIAN_INCLUDED_DOCUMENTVALUELIST_H 00023 00024 #include "valuelist.h" 00025 00026 #include "document.h" 00027 00029 class DocumentValueList : public ValueList { 00031 void operator=(const DocumentValueList &); 00032 00034 DocumentValueList(const DocumentValueList &); 00035 00037 Xapian::Internal::RefCntPtr<const Xapian::Document::Internal> doc; 00038 00043 Xapian::Document::Internal::document_values::const_iterator it; 00044 00045 public: 00046 DocumentValueList(const Xapian::Internal::RefCntPtr<Xapian::Document::Internal> & doc_) 00047 : doc(doc_), it(doc->values.end()) { } 00048 00049 Xapian::docid get_docid() const; 00050 00051 std::string get_value() const; 00052 00053 Xapian::valueno get_valueno() const; 00054 00055 bool at_end() const; 00056 00057 void next(); 00058 00060 void skip_to(Xapian::docid slot); 00061 00062 std::string get_description() const; 00063 }; 00064 00065 #endif // XAPIAN_INCLUDED_DOCUMENTVALUELIST_H