Soprano::Util::AsyncResult Class Reference

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

#include <Soprano/Util/AsyncResult>

Inheritance diagram for Soprano::Util::AsyncResult:
Inheritance graph
[legend]

List of all members.

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)

Static Public Member Functions

static AsyncResultcreateResult ()

Detailed Description

A delayed result as returned by AsyncModel.

Author:
Sebastian Trueg <trueg@kde.org>
Since:
2.1

Definition at line 52 of file asyncresult.h.


Constructor & Destructor Documentation

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

Member Function Documentation

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.

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

Constructor method to ensure binary compatibility.

Since:
2.2
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.

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 Soprano::Util::AsyncResult::statementIterator (  )  const

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

See also:
value()
Since:
2.2
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 Soprano::Util::AsyncResult::queryResultIterator (  )  const

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

See also:
value()
Since:
2.2
Node Soprano::Util::AsyncResult::node (  )  const

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

See also:
value()
Since:
2.2
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:

Generated on 14 Sep 2009 for Soprano by  doxygen 1.6.1