Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 5b6c31d6428e1f6ea754ea6f7b1aed6e > files > 91

soprano-apidocs-2.6.0-2.fc14.noarch.rpm

<!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::Error::Error 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&#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;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_1Error.html">Error</a>      </li>
      <li class="navelem"><a class="el" href="classSoprano_1_1Error_1_1Error.html">Error</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>Soprano::Error::Error Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Soprano::Error::Error" -->
<p>Represents an error in Soprano.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="error_8h_source.html">Soprano/Error/Error</a>&gt;</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::Error::Error:</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_1Error_1_1Error__inherit__graph.png" border="0" usemap="#Soprano_1_1Error_1_1Error_inherit__map" alt="Inheritance graph"/></div>
<map name="Soprano_1_1Error_1_1Error_inherit__map" id="Soprano_1_1Error_1_1Error_inherit__map">
<area shape="rect" id="node3" href="classSoprano_1_1Error_1_1ParserError.html" title="Represents a parser error in Soprano." alt="" coords="5,83,184,112"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classSoprano_1_1Error_1_1Error-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#a8a172eb06dfe11dbeba812afa03b8cb0">Error</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#ac226212d55b9b5318c3c5da9c3715267">Error</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;message, int code=ErrorUnknown)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#a60df9014c342b4fbd0396bf4b3d24140">Error</a> (const <a class="el" href="classSoprano_1_1Error_1_1Error.html">Error</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#a732224a187456f3385325a0157c5122f">~Error</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Error_1_1Error.html">Error</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#a3dea74b2e35e7ab37f5d57f5a564e620">operator=</a> (const <a class="el" href="classSoprano_1_1Error_1_1Error.html">Error</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#aea178176c9e6966a5265bbccc398b27c">operator bool</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qstring.html">QString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#a266f61bd555025e745b6ead75675e57c">message</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#ab71291e78e018559504698fd08c2f35f">code</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#a54399d5c0cadd946d53df6f339243d6a">isParserError</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classSoprano_1_1Error_1_1ParserError.html">ParserError</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSoprano_1_1Error_1_1Error.html#a68bef07490d16001c1c5c9e9a14afbc8">toParserError</a> () const </td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Represents an error in Soprano. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Sebastian Trueg &lt;<a href="mailto:trueg@kde.org">trueg@kde.org</a>&gt;</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="soprano_error_handling.html">Error handling in Soprano</a> </dd></dl>

<p>Definition at line <a class="el" href="error_8h_source.html#l00076">76</a> of file <a class="el" href="error_8h_source.html">error.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8a172eb06dfe11dbeba812afa03b8cb0"></a><!-- doxytag: member="Soprano::Error::Error::Error" ref="a8a172eb06dfe11dbeba812afa03b8cb0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Error::Error::Error </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create an <a class="el" href="classSoprano_1_1Error_1_1Error.html" title="Represents an error in Soprano.">Error</a> object, representing success, i.e. no error. </p>

</div>
</div>
<a class="anchor" id="ac226212d55b9b5318c3c5da9c3715267"></a><!-- doxytag: member="Soprano::Error::Error::Error" ref="ac226212d55b9b5318c3c5da9c3715267" args="(const QString &amp;message, int code=ErrorUnknown)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Error::Error::Error </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>code</em> = <code>ErrorUnknown</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Create an <a class="el" href="classSoprano_1_1Error_1_1Error.html" title="Represents an error in Soprano.">Error</a> object.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">message</td><td>A human-readable error message. </td></tr>
    <tr><td class="paramname">code</td><td>An optional machine-readable error code. Can be one of Soprano::ErrorCode or a user defined value which has to be bigger than ErrorUnknown. The redland backend for example uses error codes <em>ErrorUnknown + redlandCode</em>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a60df9014c342b4fbd0396bf4b3d24140"></a><!-- doxytag: member="Soprano::Error::Error::Error" ref="a60df9014c342b4fbd0396bf4b3d24140" args="(const Error &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Error::Error::Error </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSoprano_1_1Error_1_1Error.html">Error</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Copy constructor </p>

</div>
</div>
<a class="anchor" id="a732224a187456f3385325a0157c5122f"></a><!-- doxytag: member="Soprano::Error::Error::~Error" ref="a732224a187456f3385325a0157c5122f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Soprano::Error::Error::~Error </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Destructor </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a3dea74b2e35e7ab37f5d57f5a564e620"></a><!-- doxytag: member="Soprano::Error::Error::operator=" ref="a3dea74b2e35e7ab37f5d57f5a564e620" args="(const Error &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Error_1_1Error.html">Error</a>&amp; Soprano::Error::Error::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classSoprano_1_1Error_1_1Error.html">Error</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented in <a class="el" href="classSoprano_1_1Error_1_1ParserError.html#ab4da871e4e17cb9755d6cbf9b7ff5518">Soprano::Error::ParserError</a>.</p>

</div>
</div>
<a class="anchor" id="aea178176c9e6966a5265bbccc398b27c"></a><!-- doxytag: member="Soprano::Error::Error::operator bool" ref="aea178176c9e6966a5265bbccc398b27c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Soprano::Error::Error::operator bool </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>An Error evalutes to a boolean, indicating if an Error is "set".</p>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>false</code> if <a class="el" href="classSoprano_1_1Error_1_1Error.html#ab71291e78e018559504698fd08c2f35f">code()</a> == <a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525a69f521a4f40b463680d393963d5b4187">ErrorNone</a>, <code>true</code> otherwise.</dd></dl>
<p>Thus, an <a class="el" href="classSoprano_1_1Error_1_1Error.html" title="Represents an error in Soprano.">Error</a> object can easily be checked as follows:</p>
<div class="fragment"><pre class="fragment"> model.<a class="code" href="classSoprano_1_1Model.html#aed5b923235288fbac997850cca8f6053">addStatement</a>( s );
 <span class="keywordflow">if</span>( model.<a class="code" href="classSoprano_1_1Error_1_1ErrorCache.html#a3251b8052cdf932d59a523ca215d21c9">lastError</a>() ) {
    displayError( model.<a class="code" href="classSoprano_1_1Error_1_1ErrorCache.html#a3251b8052cdf932d59a523ca215d21c9">lastError</a>() );
 }
</pre></div> 
<p>Definition at line <a class="el" href="error_8h_source.html#l00120">120</a> of file <a class="el" href="error_8h_source.html">error.h</a>.</p>

</div>
</div>
<a class="anchor" id="a266f61bd555025e745b6ead75675e57c"></a><!-- doxytag: member="Soprano::Error::Error::message" ref="a266f61bd555025e745b6ead75675e57c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstring.html">QString</a> Soprano::Error::Error::message </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>A string explaining the error in detail. This string is not necessarily translated (this depends on the plugin implementation).</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>An error message describing the error or an empty string for no-error (i.e. success) instances. </dd></dl>

</div>
</div>
<a class="anchor" id="ab71291e78e018559504698fd08c2f35f"></a><!-- doxytag: member="Soprano::Error::Error::code" ref="ab71291e78e018559504698fd08c2f35f" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Soprano::Error::Error::code </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>An error code. If the error code is <a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525a69f521a4f40b463680d393963d5b4187">ErrorNone</a> the <a class="el" href="classSoprano_1_1Error_1_1Error.html" title="Represents an error in Soprano.">Error</a> instance represents success. The code can either be one of the values of ErrorCode or a value above <a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525a2ca96b602ece4de291a083e2c1958227">ErrorUnknown</a>.</p>
<p>Example: The redland backend defines the error code as: </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525a2ca96b602ece4de291a083e2c1958227">ErrorUnknown</a> + librdf_log_message_code()
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="namespaceSoprano_1_1Error.html#aef1bd25c5b6705951735e0fb5c5ff525">ErrorCode</a>, <a class="el" href="namespaceSoprano_1_1Error.html#ae35d0cea5ed6a8fdc4e4adc89b5954c4">Error::convertErrorCode</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a54399d5c0cadd946d53df6f339243d6a"></a><!-- doxytag: member="Soprano::Error::Error::isParserError" ref="a54399d5c0cadd946d53df6f339243d6a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Soprano::Error::Error::isParserError </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if this <a class="el" href="classSoprano_1_1Error_1_1Error.html" title="Represents an error in Soprano.">Error</a> instance represents a parser error. In that case the error can be converted to a <a class="el" href="classSoprano_1_1Error_1_1ParserError.html" title="Represents a parser error in Soprano.">ParserError</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a68bef07490d16001c1c5c9e9a14afbc8"></a><!-- doxytag: member="Soprano::Error::Error::toParserError" ref="a68bef07490d16001c1c5c9e9a14afbc8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classSoprano_1_1Error_1_1ParserError.html">ParserError</a> Soprano::Error::Error::toParserError </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Converts this error into a <a class="el" href="classSoprano_1_1Error_1_1ParserError.html" title="Represents a parser error in Soprano.">ParserError</a>. This has the same effect as </p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classSoprano_1_1Error_1_1Error.html#a8a172eb06dfe11dbeba812afa03b8cb0">Error</a> e;
 ParserError p1( e );
</pre></div><dl class="return"><dt><b>Returns:</b></dt><dd>If <a class="el" href="classSoprano_1_1Error_1_1Error.html#a54399d5c0cadd946d53df6f339243d6a">isParserError()</a> returns true a <a class="el" href="classSoprano_1_1Error_1_1ParserError.html" title="Represents a parser error in Soprano.">ParserError</a> with a valid <a class="el" href="classSoprano_1_1Error_1_1Locator.html" title="Details of a parser Error.">Locator</a> value, otherwise a <a class="el" href="classSoprano_1_1Error_1_1ParserError.html" title="Represents a parser error in Soprano.">ParserError</a> with an empty <a class="el" href="classSoprano_1_1Error_1_1Locator.html" title="Details of a parser Error.">Locator</a>. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/builddir/build/BUILD/soprano-2.6.0/soprano/<a class="el" href="error_8h_source.html">error.h</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Mar 11 2011 for Soprano by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>