<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Soprano: Soprano::Util::AsyncResult Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <script type="text/javascript"> function hasClass(ele,cls) { return ele.className.match(new RegExp('(\\s|^)'+cls+'(\\s|$)')); } function addClass(ele,cls) { if (!this.hasClass(ele,cls)) ele.className += " "+cls; } function removeClass(ele,cls) { if (hasClass(ele,cls)) { var reg = new RegExp('(\\s|^)'+cls+'(\\s|$)'); ele.className=ele.className.replace(reg,' '); } } function toggleVisibility(linkObj) { var base = linkObj.getAttribute('id'); var summary = document.getElementById(base + '-summary'); var content = document.getElementById(base + '-content'); var trigger = document.getElementById(base + '-trigger'); if ( hasClass(linkObj,'closed') ) { summary.style.display = 'none'; content.style.display = 'block'; trigger.src = 'open.png'; removeClass(linkObj,'closed'); addClass(linkObj,'opened'); } else if ( hasClass(linkObj,'opened') ) { summary.style.display = 'block'; content.style.display = 'none'; trigger.src = 'closed.png'; removeClass(linkObj,'opened'); addClass(linkObj,'closed'); } return false; } </script> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Soprano <span id="projectnumber">2.6.0</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceSoprano.html">Soprano</a> </li> <li class="navelem"><a class="el" href="namespaceSoprano_1_1Util.html">Util</a> </li> <li class="navelem"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html">AsyncResult</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#signals">Signals</a> | <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> </div> <div class="headertitle"> <h1>Soprano::Util::AsyncResult Class Reference</h1> </div> </div> <div class="contents"> <!-- doxytag: class="Soprano::Util::AsyncResult" --><!-- doxytag: inherits="QObject,Soprano::Error::ErrorCache" --> <p>A delayed result as returned by <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html" title="Filter model that allows to perform operations asyncroneously.">AsyncModel</a>. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="asyncresult_8h_source.html">Soprano/Util/AsyncResult</a>></code></p> <div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;"> <img id="dynsection-0-trigger" src="closed.png"/> Inheritance diagram for Soprano::Util::AsyncResult:</div> <div id="dynsection-0-summary" class="dynsummary" style="display:block;"> </div> <div id="dynsection-0-content" class="dyncontent" style="display:none;"> <div class="center"><img src="classSoprano_1_1Util_1_1AsyncResult__inherit__graph.png" border="0" usemap="#Soprano_1_1Util_1_1AsyncResult_inherit__map" alt="Inheritance graph"/></div> <map name="Soprano_1_1Util_1_1AsyncResult_inherit__map" id="Soprano_1_1Util_1_1AsyncResult_inherit__map"> <area shape="rect" id="node2" href="qobject.html" title="QObject" alt="" coords="5,5,75,35"/><area shape="rect" id="node4" href="classSoprano_1_1Error_1_1ErrorCache.html" title="Core class of Soprano's exception system." alt="" coords="99,5,277,35"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classSoprano_1_1Util_1_1AsyncResult-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="signals"></a> Signals</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a89c9423993d84480b0ec9aa4c19dd7e8">resultReady</a> (<a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html">Soprano::Util::AsyncResult</a> *)</td></tr> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a99afb8c75d3188df443a42106106e909">~AsyncResult</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qvariant.html">QVariant</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525">Error::ErrorCode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a6d547549afaa6813a619562366434bf8">errorCode</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1StatementIterator.html">StatementIterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#af4c9a3315794bb4a1d4730b82c774bd9">statementIterator</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1NodeIterator.html">NodeIterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a194d0cef62b609edf1307e6d473f0b5f">nodeIterator</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1QueryResultIterator.html">QueryResultIterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a94c8b70b4c50dc74ee47a23d110210ea">queryResultIterator</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Node.html">Node</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a091ea91f46c868ac9dc5c39e2ea4f874">node</a> () const </td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a8b33faef516a642acf3ff949099c49b5">setResult</a> (const <a class="elRef" href="qvariant.html">QVariant</a> &result, const <a class="el" href="classSoprano_1_1Error_1_1Error.html">Error::Error</a> &error)</td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html">AsyncResult</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a609a89d257fe349ab66a2f5b4f8a7513">createResult</a> ()</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <div class="textblock"><p>A delayed result as returned by <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html" title="Filter model that allows to perform operations asyncroneously.">AsyncModel</a>. </p> <dl class="author"><dt><b>Author:</b></dt><dd>Sebastian Trueg <<a href="mailto:trueg@kde.org">trueg@kde.org</a>></dd></dl> <dl class="since"><dt><b>Since:</b></dt><dd>2.1 </dd></dl> <p>Definition at line <a class="el" href="asyncresult_8h_source.html#l00052">52</a> of file <a class="el" href="asyncresult_8h_source.html">asyncresult.h</a>.</p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a99afb8c75d3188df443a42106106e909"></a><!-- doxytag: member="Soprano::Util::AsyncResult::~AsyncResult" ref="a99afb8c75d3188df443a42106106e909" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Soprano::Util::AsyncResult::~AsyncResult </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a89c9423993d84480b0ec9aa4c19dd7e8"></a><!-- doxytag: member="Soprano::Util::AsyncResult::resultReady" ref="a89c9423993d84480b0ec9aa4c19dd7e8" args="(Soprano::Util::AsyncResult *)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Soprano::Util::AsyncResult::resultReady </td> <td>(</td> <td class="paramtype"><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html">Soprano::Util::AsyncResult</a> * </td> <td class="paramname"></td><td>)</td> <td><code> [signal]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Emitted once the async operation is completed and the result can be read.</p> <p>The result will delete itself. </p> </div> </div> <a class="anchor" id="a609a89d257fe349ab66a2f5b4f8a7513"></a><!-- doxytag: member="Soprano::Util::AsyncResult::createResult" ref="a609a89d257fe349ab66a2f5b4f8a7513" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html">AsyncResult</a>* Soprano::Util::AsyncResult::createResult </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Constructor method to ensure binary compatibility.</p> <dl class="since"><dt><b>Since:</b></dt><dd>2.2 </dd></dl> </div> </div> <a class="anchor" id="a9a3eac49a21c297423292af1fbef7f37"></a><!-- doxytag: member="Soprano::Util::AsyncResult::value" ref="a9a3eac49a21c297423292af1fbef7f37" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="qvariant.html">QVariant</a> Soprano::Util::AsyncResult::value </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>The result of the async operation. Its type is dependent on the operation (for example <a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525">Error::ErrorCode</a> for <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#a1aac1a6a78dd0c5ddc082d8a4801b1e5">AsyncModel::addStatementAsync</a> or <a class="el" href="classSoprano_1_1StatementIterator.html" title="An iterator that provides a stream of Statements.">StatementIterator</a> for <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#a69d783d226fcbeedec9a6d150eea086c">AsyncModel::listStatementsAsync</a>). Types may need to be registered with Q_DECLARE_METATYPE.</p> <p>Use <a class="el" href="classSoprano_1_1Error_1_1ErrorCache.html#a3251b8052cdf932d59a523ca215d21c9">Error::ErrorCache::lastError()</a> to check for error details.</p> <p>This value is not ready before <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a89c9423993d84480b0ec9aa4c19dd7e8">resultReady()</a> has been emitted. <b>Do only use this in a slot connected to resultReady.</b></p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a6d547549afaa6813a619562366434bf8">errorCode</a>, <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#af4c9a3315794bb4a1d4730b82c774bd9">statementIterator</a>, <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a194d0cef62b609edf1307e6d473f0b5f">nodeIterator</a>, <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a94c8b70b4c50dc74ee47a23d110210ea">queryResultIterator</a>, <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a091ea91f46c868ac9dc5c39e2ea4f874">node</a> </dd></dl> <p>Definition at line <a class="el" href="asyncresult_8h_source.html#l00091">91</a> of file <a class="el" href="asyncresult_8h_source.html">asyncresult.h</a>.</p> </div> </div> <a class="anchor" id="a6d547549afaa6813a619562366434bf8"></a><!-- doxytag: member="Soprano::Util::AsyncResult::errorCode" ref="a6d547549afaa6813a619562366434bf8" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525">Error::ErrorCode</a> Soprano::Util::AsyncResult::errorCode </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Convinience method which converts <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a> into a <a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525">Error::ErrorCode</a> as returned for the following <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html" title="Filter model that allows to perform operations asyncroneously.">AsyncModel</a> methods: </p> <ul> <li><a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#a1aac1a6a78dd0c5ddc082d8a4801b1e5">AsyncModel::addStatementAsync</a> </li> <li><a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#a71a2940aee2bc73de98b059cc544973c">AsyncModel::removeStatementAsync</a> </li> <li><a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#af61e47b15cbe0cf44a7558554ea705b4">AsyncModel::removeAllStatementsAsync</a></li> </ul> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a></dd></dl> <dl class="since"><dt><b>Since:</b></dt><dd>2.2 </dd></dl> </div> </div> <a class="anchor" id="af4c9a3315794bb4a1d4730b82c774bd9"></a><!-- doxytag: member="Soprano::Util::AsyncResult::statementIterator" ref="af4c9a3315794bb4a1d4730b82c774bd9" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classSoprano_1_1StatementIterator.html">StatementIterator</a> Soprano::Util::AsyncResult::statementIterator </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Convinience method which converts <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a> into a <a class="el" href="classSoprano_1_1StatementIterator.html" title="An iterator that provides a stream of Statements.">StatementIterator</a> as returned <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#a69d783d226fcbeedec9a6d150eea086c">AsyncModel::listStatementsAsync</a>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a></dd></dl> <dl class="since"><dt><b>Since:</b></dt><dd>2.2 </dd></dl> </div> </div> <a class="anchor" id="a194d0cef62b609edf1307e6d473f0b5f"></a><!-- doxytag: member="Soprano::Util::AsyncResult::nodeIterator" ref="a194d0cef62b609edf1307e6d473f0b5f" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classSoprano_1_1NodeIterator.html">NodeIterator</a> Soprano::Util::AsyncResult::nodeIterator </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Convinience method which converts <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a> into a <a class="el" href="classSoprano_1_1StatementIterator.html" title="An iterator that provides a stream of Statements.">StatementIterator</a> as returned <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#aaf2c1a27a73292aab5809d694ca52e69">AsyncModel::listContextsAsync</a>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a></dd></dl> <dl class="since"><dt><b>Since:</b></dt><dd>2.2 </dd></dl> </div> </div> <a class="anchor" id="a94c8b70b4c50dc74ee47a23d110210ea"></a><!-- doxytag: member="Soprano::Util::AsyncResult::queryResultIterator" ref="a94c8b70b4c50dc74ee47a23d110210ea" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classSoprano_1_1QueryResultIterator.html">QueryResultIterator</a> Soprano::Util::AsyncResult::queryResultIterator </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Convinience method which converts <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a> into a <a class="el" href="classSoprano_1_1StatementIterator.html" title="An iterator that provides a stream of Statements.">StatementIterator</a> as returned <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#a56d028786d0d66fc7a22a2d4cf7049b7">AsyncModel::executeQueryAsync</a>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a></dd></dl> <dl class="since"><dt><b>Since:</b></dt><dd>2.2 </dd></dl> </div> </div> <a class="anchor" id="a091ea91f46c868ac9dc5c39e2ea4f874"></a><!-- doxytag: member="Soprano::Util::AsyncResult::node" ref="a091ea91f46c868ac9dc5c39e2ea4f874" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classSoprano_1_1Node.html">Node</a> Soprano::Util::AsyncResult::node </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Convinience method which converts <a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a> into a <a class="el" href="classSoprano_1_1StatementIterator.html" title="An iterator that provides a stream of Statements.">StatementIterator</a> as returned <a class="el" href="classSoprano_1_1Util_1_1AsyncModel.html#a3bc993c5dd1a1b3c01d09307726bc69e">AsyncModel::createBlankNodeAsync</a>.</p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classSoprano_1_1Util_1_1AsyncResult.html#a9a3eac49a21c297423292af1fbef7f37">value()</a></dd></dl> <dl class="since"><dt><b>Since:</b></dt><dd>2.2 </dd></dl> </div> </div> <a class="anchor" id="a8b33faef516a642acf3ff949099c49b5"></a><!-- doxytag: member="Soprano::Util::AsyncResult::setResult" ref="a8b33faef516a642acf3ff949099c49b5" args="(const QVariant &result, const Error::Error &error)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Soprano::Util::AsyncResult::setResult </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="qvariant.html">QVariant</a> & </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classSoprano_1_1Error_1_1Error.html">Error::Error</a> & </td> <td class="paramname"><em>error</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the final result and emits the resultReady signal. This method should never be called by clients. </p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>/builddir/build/BUILD/soprano-2.6.0/soprano/util/<a class="el" href="asyncresult_8h_source.html">asyncresult.h</a></li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated on Fri Mar 11 2011 for Soprano by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>