Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SOPRANO_RESULT_SET_H
00024 #define SOPRANO_RESULT_SET_H
00025
00026 #include "iterator.h"
00027 #include "bindingset.h"
00028 #include "statement.h"
00029 #include "soprano_export.h"
00030
00031 #include <QtCore/QString>
00032 #include <QtCore/QStringList>
00033
00034
00035 namespace Soprano {
00036
00037 class Node;
00038 class NodeIterator;
00039 class QueryResultIteratorBackend;
00040 class StatementIterator;
00041 class BindingSet;
00042
00108 class SOPRANO_EXPORT QueryResultIterator : public Iterator<BindingSet>
00109 {
00110 public:
00112
00115 QueryResultIterator();
00116
00120 QueryResultIterator( const QueryResultIterator& );
00121
00126 QueryResultIterator( QueryResultIteratorBackend *qr );
00127
00131 virtual ~QueryResultIterator();
00132
00136 QueryResultIterator& operator=( const QueryResultIterator& );
00138
00140
00144 Statement currentStatement() const;
00145
00150 BindingSet currentBindings() const;
00151
00159 bool boolValue() const;
00161
00163
00175 Node operator[]( int offset ) const;
00176
00189 Node operator[]( const QString name ) const;
00190
00201 Node binding( const QString &name ) const;
00202
00213 Node binding( int offset ) const;
00214
00222 int bindingCount() const;
00223
00229 QStringList bindingNames() const;
00231
00233
00239 bool isGraph() const;
00240
00247 bool isBinding() const;
00248
00257 bool isBool() const;
00259
00261
00265 QList<BindingSet> allBindings();
00266
00276 StatementIterator iterateStatements() const;
00277
00290 NodeIterator iterateBindings( const QString& variableName ) const;
00291
00304 NodeIterator iterateBindings( int offset ) const;
00305
00336 StatementIterator iterateStatementsFromBindings( const QString& subjectBindingName,
00337 const QString& predicateBindingName,
00338 const QString& objectBindingName,
00339 const QString& contextBindingName = QString(),
00340 const Statement& templateStatement = Statement() ) const;
00342 };
00343 }
00344
00345 #endif // SOPRANO_RESULT_SET_H