Soprano 2.9.4
Soprano::Util::AsyncResult Class Reference

A delayed result as returned by AsyncModel. More...

#include <Soprano/Util/AsyncResult>

Inheritance diagram for Soprano::Util::AsyncResult:

Signals

void resultReady (Soprano::Util::AsyncResult *)

Public Member Functions

 ~AsyncResult ()
QVariant value () const
Error::ErrorCode errorCode () const
StatementIterator statementIterator () const
NodeIterator nodeIterator () const
QueryResultIterator queryResultIterator () const
Node node () const
void setResult (const QVariant &result, const Error::Error &error)
Public Member Functions inherited from QObject
 QObject (QObject *parent=0)
 blockSignals (bool block)
 childEvent (QChildEvent *event)
 children ()
 connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type=Qt::AutoCompatConnection)
 connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type=Qt::AutoCompatConnection)
 connectNotify (const char *signal)
 customEvent (QEvent *event)
 deleteLater ()
 destroyed (QObject *obj=0)
 disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 disconnect (const char *signal=0, const QObject *receiver=0, const char *method=0)
 disconnect (const QObject *receiver, const char *method=0)
 disconnectNotify (const char *signal)
 dumpObjectInfo ()
 dumpObjectTree ()
 dynamicPropertyNames ()
 event (QEvent *e)
 eventFilter (QObject *watched, QEvent *event)
 findChild (const QString &name=QString()
 findChildren (const QString &name=QString()
 findChildren (const QRegExp &regExp)
 inherits (const char *className)
 installEventFilter (QObject *filterObj)
 isWidgetType ()
 killTimer (int id)
 metaObject ()
 moveToThread (QThread *targetThread)
 parent ()
 property (const char *name)
 receivers (const char *signal)
 removeEventFilter (QObject *obj)
 sender ()
 setParent (QObject *parent)
 setProperty (const char *name, const QVariant &value)
 signalsBlocked ()
 startTimer (int interval)
 thread ()
 timerEvent (QTimerEvent *event)
 tr (const char *sourceText, const char *comment=0, int n=-1)
 trUtf8 (const char *sourceText, const char *comment=0, int n=-1)
 staticMetaObject
 QObject (QObject *parent, const char *name)
 checkConnectArgs (const char *signal, const QObject *object, const char *method)
 child (const char *objName, const char *inheritsClass=0, bool recursiveSearch=true)
 className ()
 insertChild (QObject *object)
 isA (const char *className)
 name ()
 name (const char *defaultName)
 normalizeSignalSlot (const char *signalSlot)
 removeChild (QObject *object)
 setName (const char *name)
Public Member Functions inherited from Soprano::Error::ErrorCache
virtual ~ErrorCache ()
virtual Error lastError () const

Static Public Member Functions

static AsyncResultcreateResult ()

Additional Inherited Members

Protected Member Functions inherited from Soprano::Error::ErrorCache
 ErrorCache ()
void clearError () const
void setError (const Error &) const
void setError (const QString &errorMessage, int code=ErrorUnknown) const

Detailed Description

A delayed result as returned by AsyncModel.

Author
Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org
Since
2.1

Definition at line 52 of file asyncresult.h.

Constructor & Destructor Documentation

◆ ~AsyncResult()

Soprano::Util::AsyncResult::~AsyncResult ( )

Member Function Documentation

◆ resultReady

void Soprano::Util::AsyncResult::resultReady ( Soprano::Util::AsyncResult * )
signal

Emitted once the async operation is completed and the result can be read.

The result will delete itself.

◆ createResult()

AsyncResult * Soprano::Util::AsyncResult::createResult ( )
static

Constructor method to ensure binary compatibility.

Since
2.2

◆ value()

QVariant Soprano::Util::AsyncResult::value ( ) const
inline

The result of the async operation. Its type is dependent on the operation (for example Error::ErrorCode for AsyncModel::addStatementAsync or StatementIterator for AsyncModel::listStatementsAsync). Types may need to be registered with Q_DECLARE_METATYPE.

Use Error::ErrorCache::lastError() to check for error details.

This value is not ready before resultReady() has been emitted. Do only use this in a slot connected to resultReady.

See also
errorCode, statementIterator, nodeIterator, queryResultIterator, node

Definition at line 91 of file asyncresult.h.

◆ errorCode()

Error::ErrorCode Soprano::Util::AsyncResult::errorCode ( ) const

Convinience method which converts value() into a Error::ErrorCode as returned for the following AsyncModel methods:

See also
value()
Since
2.2

◆ statementIterator()

StatementIterator Soprano::Util::AsyncResult::statementIterator ( ) const

Convinience method which converts value() into a StatementIterator as returned AsyncModel::listStatementsAsync.

See also
value()
Since
2.2

◆ nodeIterator()

NodeIterator Soprano::Util::AsyncResult::nodeIterator ( ) const

Convinience method which converts value() into a StatementIterator as returned AsyncModel::listContextsAsync.

See also
value()
Since
2.2

◆ queryResultIterator()

QueryResultIterator Soprano::Util::AsyncResult::queryResultIterator ( ) const

Convinience method which converts value() into a StatementIterator as returned AsyncModel::executeQueryAsync.

See also
value()
Since
2.2

◆ node()

Node Soprano::Util::AsyncResult::node ( ) const

Convinience method which converts value() into a StatementIterator as returned AsyncModel::createBlankNodeAsync.

See also
value()
Since
2.2

◆ setResult()

void Soprano::Util::AsyncResult::setResult ( const QVariant & result,
const Error::Error & error )

Sets the final result and emits the resultReady signal. This method should never be called by clients.


The documentation for this class was generated from the following file: