Revert "Fix integer type used by ESet"
[xapian.git] / xapian-core / api / documentvaluelist.h
blob58ac71b15d9aaa3e50f2563138e33539b304aea4
1 /** @file
2 * @brief Iteration over values in a document.
3 */
4 /* Copyright (C) 2007,2008,2009,2011 Olly Betts
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (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 #ifndef XAPIAN_INCLUDED_DOCUMENTVALUELIST_H
22 #define XAPIAN_INCLUDED_DOCUMENTVALUELIST_H
24 #include "backends/valuelist.h"
26 #include "backends/document.h"
28 /// Iteration over values in a document.
29 class DocumentValueList final : public ValueList {
30 /// Don't allow assignment.
31 void operator=(const DocumentValueList &);
33 /// Don't allow copying.
34 DocumentValueList(const DocumentValueList &);
36 /// Document internals we're iterating over.
37 Xapian::Internal::intrusive_ptr<const Xapian::Document::Internal> doc;
39 /** Iterator over the map inside @a doc.
41 * If we haven't started yet, this will be set to: doc->values.end()
43 Xapian::Document::Internal::document_values::const_iterator it;
45 public:
46 explicit DocumentValueList(const Xapian::Internal::intrusive_ptr<Xapian::Document::Internal> & doc_)
47 : doc(doc_), it(doc->values.end()) { }
49 Xapian::docid get_docid() const;
51 std::string get_value() const;
53 Xapian::valueno get_valueno() const;
55 bool at_end() const;
57 void next();
59 /// The parameter is actually a Xapian::valueno for this subclass.
60 void skip_to(Xapian::docid slot);
62 std::string get_description() const;
65 #endif // XAPIAN_INCLUDED_DOCUMENTVALUELIST_H