<!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: /builddir/build/BUILD/soprano-2.5.2/soprano/literalvalue.h Source File</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.1 --> <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 class="navigation" id="top"> <div 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><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <h1>/builddir/build/BUILD/soprano-2.5.2/soprano/literalvalue.h</h1> </div> </div> <div class="contents"> <a href="literalvalue_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> * This file is part of Soprano Project.</span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2007 Sebastian Trueg <trueg@kde.org></span> <a name="l00005"></a>00005 <span class="comment"> *</span> <a name="l00006"></a>00006 <span class="comment"> * This library is free software; you can redistribute it and/or</span> <a name="l00007"></a>00007 <span class="comment"> * modify it under the terms of the GNU Library General Public</span> <a name="l00008"></a>00008 <span class="comment"> * License as published by the Free Software Foundation; either</span> <a name="l00009"></a>00009 <span class="comment"> * version 2 of the License, or (at your option) any later version.</span> <a name="l00010"></a>00010 <span class="comment"> *</span> <a name="l00011"></a>00011 <span class="comment"> * This library is distributed in the hope that it will be useful,</span> <a name="l00012"></a>00012 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00013"></a>00013 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00014"></a>00014 <span class="comment"> * Library General Public License for more details.</span> <a name="l00015"></a>00015 <span class="comment"> *</span> <a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU Library General Public License</span> <a name="l00017"></a>00017 <span class="comment"> * along with this library; see the file COPYING.LIB. If not, write to</span> <a name="l00018"></a>00018 <span class="comment"> * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,</span> <a name="l00019"></a>00019 <span class="comment"> * Boston, MA 02110-1301, USA.</span> <a name="l00020"></a>00020 <span class="comment"> */</span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="preprocessor">#ifndef LITERAL_VALUE_H</span> <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define LITERAL_VALUE_H</span> <a name="l00024"></a>00024 <span class="preprocessor"></span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="soprano__export_8h.html">soprano_export.h</a>"</span> <a name="l00026"></a>00026 <a name="l00027"></a>00027 <span class="preprocessor">#include <QtCore/QVariant></span> <a name="l00028"></a>00028 <span class="preprocessor">#include <QtCore/QSharedDataPointer></span> <a name="l00029"></a>00029 <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="languagetag_8h.html">languagetag.h</a>"</span> <a name="l00031"></a>00031 <a name="l00032"></a>00032 <a name="l00033"></a>00033 <span class="keyword">namespace </span>Soprano <a name="l00034"></a>00034 { <a name="l00066"></a><a class="code" href="classSoprano_1_1LiteralValue.html">00066</a> <span class="keyword">class </span><a class="code" href="soprano__export_8h.html#a4f040b77f4fdd45fda0c3d6ced1e3776">SOPRANO_EXPORT</a> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a> <a name="l00067"></a>00067 { <a name="l00068"></a>00068 <span class="keyword">public</span>: <a name="l00070"></a>00070 <a name="l00073"></a>00073 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>(); <a name="l00074"></a>00074 <a name="l00078"></a>00078 ~<a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>(); <a name="l00079"></a>00079 <a name="l00083"></a>00083 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& other ); <a name="l00084"></a>00084 <a name="l00090"></a>00090 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <a class="codeRef" href="qvariant.html">QVariant</a>& v ); <a name="l00091"></a>00091 <a name="l00096"></a>00096 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keywordtype">int</span> i ); <a name="l00097"></a>00097 <a name="l00102"></a>00102 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( qlonglong i ); <a name="l00103"></a>00103 <a name="l00108"></a>00108 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( uint i ); <a name="l00109"></a>00109 <a name="l00114"></a>00114 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( qulonglong i ); <a name="l00115"></a>00115 <a name="l00120"></a>00120 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keywordtype">bool</span> b ); <a name="l00121"></a>00121 <a name="l00126"></a>00126 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keywordtype">double</span> d ); <a name="l00127"></a>00127 <a name="l00134"></a>00134 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span> ); <a name="l00135"></a>00135 <a name="l00140"></a>00140 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <a class="codeRef" href="qlatin1string.html">QLatin1String</a>& <span class="keywordtype">string</span> ); <a name="l00141"></a>00141 <a name="l00146"></a>00146 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& <span class="keywordtype">string</span> ); <a name="l00147"></a>00147 <a name="l00152"></a>00152 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <a class="codeRef" href="qdate.html">QDate</a>& <a class="code" href="namespaceSoprano_1_1Vocabulary_1_1XMLSchema.html#a6c5630132f01314c7b61773e7411f5a7">date</a> ); <a name="l00153"></a>00153 <a name="l00158"></a>00158 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <a class="codeRef" href="qtime.html">QTime</a>& <a class="code" href="namespaceSoprano_1_1Vocabulary_1_1XMLSchema.html#adccb42f50a49dccd76a8706bd125521b">time</a> ); <a name="l00159"></a>00159 <a name="l00164"></a>00164 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <a class="codeRef" href="qdatetime.html">QDateTime</a>& datetime ); <a name="l00165"></a>00165 <a name="l00170"></a>00170 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>( <span class="keyword">const</span> <a class="codeRef" href="qbytearray.html">QByteArray</a>& data ); <a name="l00172"></a>00172 <a name="l00174"></a>00174 <a name="l00177"></a>00177 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keyword">const</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& other ); <a name="l00178"></a>00178 <a name="l00191"></a>00191 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keywordtype">int</span> i ); <a name="l00192"></a>00192 <a name="l00197"></a>00197 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( qlonglong i ); <a name="l00198"></a>00198 <a name="l00210"></a>00210 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( uint i ); <a name="l00211"></a>00211 <a name="l00216"></a>00216 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( qulonglong i ); <a name="l00217"></a>00217 <a name="l00222"></a>00222 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keywordtype">bool</span> b ); <a name="l00223"></a>00223 <a name="l00228"></a>00228 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keywordtype">double</span> d ); <a name="l00229"></a>00229 <a name="l00234"></a>00234 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& s ); <a name="l00235"></a>00235 <a name="l00240"></a>00240 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keyword">const</span> <a class="codeRef" href="qlatin1string.html">QLatin1String</a>& s ); <a name="l00241"></a>00241 <a name="l00246"></a>00246 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keyword">const</span> <a class="codeRef" href="qdate.html">QDate</a>& date ); <a name="l00247"></a>00247 <a name="l00252"></a>00252 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keyword">const</span> <a class="codeRef" href="qtime.html">QTime</a>& time ); <a name="l00253"></a>00253 <a name="l00258"></a>00258 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keyword">const</span> <a class="codeRef" href="qdatetime.html">QDateTime</a>& datetime ); <a name="l00259"></a>00259 <a name="l00264"></a>00264 <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& operator=( <span class="keyword">const</span> <a class="codeRef" href="qbytearray.html">QByteArray</a>& data ); <a name="l00266"></a>00266 <a name="l00268"></a>00268 <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& other ) <span class="keyword">const</span>; <a name="l00269"></a>00269 <a name="l00270"></a>00270 <span class="keywordtype">bool</span> operator!=( <span class="keyword">const</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& other ) <span class="keyword">const</span>; <a name="l00272"></a>00272 <a name="l00274"></a>00274 <span class="keywordtype">bool</span> isValid() <span class="keyword">const</span>; <a name="l00275"></a>00275 <a name="l00282"></a>00282 <span class="keywordtype">bool</span> isPlain() <span class="keyword">const</span>; <a name="l00283"></a>00283 <a name="l00284"></a>00284 <span class="keywordtype">bool</span> isInt() <span class="keyword">const</span>; <a name="l00285"></a>00285 <span class="keywordtype">bool</span> isInt64() <span class="keyword">const</span>; <a name="l00286"></a>00286 <span class="keywordtype">bool</span> isUnsignedInt() <span class="keyword">const</span>; <a name="l00287"></a>00287 <span class="keywordtype">bool</span> isUnsignedInt64() <span class="keyword">const</span>; <a name="l00288"></a>00288 <span class="keywordtype">bool</span> isBool() <span class="keyword">const</span>; <a name="l00289"></a>00289 <span class="keywordtype">bool</span> isDouble() <span class="keyword">const</span>; <a name="l00290"></a>00290 <a name="l00297"></a>00297 <span class="keywordtype">bool</span> isString() <span class="keyword">const</span>; <a name="l00298"></a>00298 <span class="keywordtype">bool</span> isDate() <span class="keyword">const</span>; <a name="l00299"></a>00299 <span class="keywordtype">bool</span> isTime() <span class="keyword">const</span>; <a name="l00300"></a>00300 <span class="keywordtype">bool</span> isDateTime() <span class="keyword">const</span>; <a name="l00301"></a>00301 <span class="keywordtype">bool</span> isByteArray() <span class="keyword">const</span>; <a name="l00303"></a>00303 <a name="l00305"></a>00305 <span class="keywordtype">int</span> toInt() <span class="keyword">const</span>; <a name="l00306"></a>00306 qlonglong toInt64() <span class="keyword">const</span>; <a name="l00307"></a>00307 uint toUnsignedInt() <span class="keyword">const</span>; <a name="l00308"></a>00308 qulonglong toUnsignedInt64() <span class="keyword">const</span>; <a name="l00309"></a>00309 <span class="keywordtype">bool</span> toBool() <span class="keyword">const</span>; <a name="l00310"></a>00310 <span class="keywordtype">double</span> toDouble() <span class="keyword">const</span>; <a name="l00311"></a>00311 <a name="l00324"></a>00324 <a class="codeRef" href="qstring.html">QString</a> toString() <span class="keyword">const</span>; <a name="l00325"></a>00325 <a class="codeRef" href="qdate.html">QDate</a> toDate() <span class="keyword">const</span>; <a name="l00326"></a>00326 <a class="codeRef" href="qtime.html">QTime</a> toTime() <span class="keyword">const</span>; <a name="l00327"></a>00327 <a class="codeRef" href="qdatetime.html">QDateTime</a> toDateTime() <span class="keyword">const</span>; <a name="l00328"></a>00328 <a class="codeRef" href="qbytearray.html">QByteArray</a> toByteArray() <span class="keyword">const</span>; <a name="l00330"></a>00330 <a name="l00332"></a>00332 <a name="l00339"></a>00339 <a class="codeRef" href="qurl.html">QUrl</a> dataTypeUri() <span class="keyword">const</span>; <a name="l00340"></a>00340 <a name="l00347"></a>00347 <a class="code" href="classSoprano_1_1LanguageTag.html" title="A LanguageTag represents a language according to RFC 3066 and RFC 4646.">LanguageTag</a> <a class="code" href="namespaceSoprano_1_1Vocabulary_1_1Xesam.html#a24eb968dfba3510cc343904910f0059d">language</a>() <span class="keyword">const</span>; <a name="l00348"></a>00348 <a name="l00355"></a>00355 QVariant::Type <a class="code" href="namespaceSoprano_1_1Vocabulary_1_1RDF.html#a28ec91b268156971dedc36c027a023a6">type</a>() <span class="keyword">const</span>; <a name="l00356"></a>00356 <a name="l00362"></a>00362 <a class="codeRef" href="qvariant.html">QVariant</a> variant() <span class="keyword">const</span>; <a name="l00364"></a>00364 <a name="l00372"></a>00372 <span class="keyword">static</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a> fromString( <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& <a class="code" href="namespaceSoprano_1_1Vocabulary_1_1RDF.html#a0e57b07dcc5317ad7925ebdb466528c0">value</a>, QVariant::Type type ); <a name="l00373"></a>00373 <a name="l00395"></a>00395 <span class="keyword">static</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a> fromString( <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& value, <span class="keyword">const</span> <a class="codeRef" href="qurl.html">QUrl</a>& dataTypeUri ); <a name="l00396"></a>00396 <a name="l00412"></a>00412 <span class="keyword">static</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a> createPlainLiteral( <span class="keyword">const</span> <a class="codeRef" href="qstring.html">QString</a>& value, <span class="keyword">const</span> <a class="code" href="classSoprano_1_1LanguageTag.html" title="A LanguageTag represents a language according to RFC 3066 and RFC 4646.">LanguageTag</a>& lang = <a class="code" href="classSoprano_1_1LanguageTag.html" title="A LanguageTag represents a language according to RFC 3066 and RFC 4646.">LanguageTag</a>() ); <a name="l00413"></a>00413 <a name="l00419"></a>00419 <span class="keyword">static</span> QVariant::Type typeFromDataTypeUri( <span class="keyword">const</span> <a class="codeRef" href="qurl.html">QUrl</a>& dataTypeUri ); <a name="l00420"></a>00420 <a name="l00426"></a>00426 <span class="keyword">static</span> <a class="codeRef" href="qurl.html">QUrl</a> dataTypeUriFromType( QVariant::Type type ); <a name="l00427"></a>00427 <a name="l00428"></a>00428 <span class="keyword">private</span>: <a name="l00429"></a>00429 <span class="keyword">class </span>LiteralValueData; <a name="l00430"></a>00430 <span class="keyword">class </span>PlainData; <a name="l00431"></a>00431 <span class="keyword">class </span>TypedData; <a name="l00432"></a>00432 <a class="codeRef" href="qshareddatapointer.html">QSharedDataPointer<LiteralValueData></a> d; <a name="l00433"></a>00433 }; <a name="l00434"></a>00434 <a name="l00435"></a>00435 <a class="code" href="soprano__export_8h.html#a4f040b77f4fdd45fda0c3d6ced1e3776">SOPRANO_EXPORT</a> uint <a class="code" href="namespaceSoprano.html#ad6ab842f23f336a1514d9ed0a96d9a91">qHash</a>( <span class="keyword">const</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">LiteralValue</a>& lit ); <a name="l00436"></a>00436 } <a name="l00437"></a>00437 <a name="l00438"></a>00438 <a class="code" href="soprano__export_8h.html#a4f040b77f4fdd45fda0c3d6ced1e3776">SOPRANO_EXPORT</a> QDebug <a class="code" href="classSoprano_1_1Node.html#aff938f0aa52cd43994f92bdf4c4f89bf">operator<<</a>( QDebug dbg, <span class="keyword">const</span> <a class="code" href="classSoprano_1_1LiteralValue.html" title="Represents a literal value of an RDF Node.">Soprano::LiteralValue</a>& ); <a name="l00439"></a>00439 <a name="l00440"></a>00440 <span class="preprocessor">#endif</span> </pre></div></div> </div> <hr class="footer"/><address class="footer"><small>Generated on Thu Oct 21 2010 for Soprano by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>