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 #ifndef _SOPRANO_UTIL_ASYNC_QUERY_H_
00023 #define _SOPRANO_UTIL_ASYNC_QUERY_H_
00024
00025 #include <QtCore/QObject>
00026 #include "error.h"
00027 #include "sopranotypes.h"
00028 #include "soprano_export.h"
00029
00030 namespace Soprano {
00031
00032 class Statement;
00033 class BindingSet;
00034 class Node;
00035 class Model;
00036
00037 namespace Util {
00076 class SOPRANO_EXPORT AsyncQuery : public QObject, public Error::ErrorCache
00077 {
00078 Q_OBJECT
00079
00080 public:
00088 ~AsyncQuery();
00089
00091
00095 Statement currentStatement() const;
00096
00101 BindingSet currentBindings() const;
00102
00110 bool boolValue() const;
00112
00114
00124 Node binding( const QString &name ) const;
00125
00136 Node binding( int offset ) const;
00137
00145 int bindingCount() const;
00146
00152 QStringList bindingNames() const;
00154
00156
00162 bool isGraph() const;
00163
00170 bool isBinding() const;
00171
00181 bool isBool() const;
00183
00184 public Q_SLOTS:
00193 bool next();
00194
00202 void close();
00203
00204 Q_SIGNALS:
00213 void nextReady( Soprano::Util::AsyncQuery* query );
00214
00226 void finished( Soprano::Util::AsyncQuery* query );
00227
00228 public:
00244 static AsyncQuery* executeQuery( Soprano::Model* model,
00245 const QString& query,
00246 Query::QueryLanguage language,
00247 const QString& userQueryLanguage = QString() );
00248
00249 private:
00250 AsyncQuery();
00251
00252 class Private;
00253 Private* const d;
00254
00255 Q_PRIVATE_SLOT( d, void _s_finished() )
00256 Q_PRIVATE_SLOT( d, void _s_emitNextReady() )
00257 };
00258 }
00259 }
00260
00261 #endif