2
* This file is part of Soprano Project.
4
* Copyright (C) 2006 Daniele Galdi <daniele.galdi@gmail.com>
5
* Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
7
* This library is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU Library General Public
9
* License as published by the Free Software Foundation; either
10
* version 2 of the License, or (at your option) any later version.
12
* This library is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Library General Public License for more details.
17
* You should have received a copy of the GNU Library General Public License
18
* along with this library; see the file COPYING.LIB. If not, write to
19
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20
* Boston, MA 02110-1301, USA.
23
#ifndef SOPRANO_RESULT_SET_H
24
#define SOPRANO_RESULT_SET_H
26
#include <QtCore/QString>
27
#include <QtCore/QStringList>
28
#include <QtCore/QSharedDataPointer>
30
#include <soprano/soprano_export.h>
32
// FIXME: The ResultSet itself should not behave like an iterator if possible
40
class SOPRANO_EXPORT ResultSet
44
ResultSet( const ResultSet& );
45
ResultSet( QueryResult *qr );
49
ResultSet& operator=( const ResultSet& );
52
* Advance to the next entry (statement or bindingset)
53
* \return true if the end of the ResultSet was not reached yet.
54
* false if no more entries are found or if the ResultSet was
55
* already invalidated by a call to model.
60
* Retrieve the current Statement after a call to next.
62
Statement currentStatement() const;
64
Node binding( const QString &name ) const;
66
Node binding( int offset ) const;
68
int bindingCount() const;
70
QStringList bindingNames() const;
74
bool isBinding() const;
78
bool boolValue() const;
81
* Retrieve a Model containing all Statements from a graph query.
83
* After calling this method the ResultSet is invalidated, i.e. can not
86
* \return A new Model containing all result Statements from the graph query
87
* or 0 in case this ResultSet does not represent a graph query or next has
88
* already been called to iterate over the results.
89
* Caution: the caller has to take care of deleting the
96
QSharedDataPointer<Private> d;
101
#endif // SOPRANO_RESULT_SET_H