<!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>SLV2: value.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 --> <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="modules.html"><span>Modules</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> </ul> </div> <div class="header"> <div class="headertitle"> <h1>value.h</h1> </div> </div> <div class="contents"> <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* SLV2</span> <a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2007-2009 Dave Robillard <http://drobilla.net></span> <a name="l00003"></a>00003 <span class="comment"> *</span> <a name="l00004"></a>00004 <span class="comment"> * This library is free software; you can redistribute it and/or modify it</span> <a name="l00005"></a>00005 <span class="comment"> * under the terms of the GNU General Public License as published by the Free</span> <a name="l00006"></a>00006 <span class="comment"> * Software Foundation; either version 2 of the License, or (at your option)</span> <a name="l00007"></a>00007 <span class="comment"> * any later version.</span> <a name="l00008"></a>00008 <span class="comment"> *</span> <a name="l00009"></a>00009 <span class="comment"> * This library is distributed in the hope that it will be useful, but WITHOUT</span> <a name="l00010"></a>00010 <span class="comment"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or</span> <a name="l00011"></a>00011 <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License</span> <a name="l00012"></a>00012 <span class="comment"> * for more details.</span> <a name="l00013"></a>00013 <span class="comment"> *</span> <a name="l00014"></a>00014 <span class="comment"> * You should have received a copy of the GNU General Public License along</span> <a name="l00015"></a>00015 <span class="comment"> * with this program; if not, write to the Free Software Foundation, Inc.,</span> <a name="l00016"></a>00016 <span class="comment"> * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.</span> <a name="l00017"></a>00017 <span class="comment"> */</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#ifndef __SLV2_VALUE_H__</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __SLV2_VALUE_H__</span> <a name="l00021"></a>00021 <span class="preprocessor"></span> <a name="l00022"></a>00022 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> { <a name="l00024"></a>00024 <span class="preprocessor">#endif</span> <a name="l00025"></a>00025 <span class="preprocessor"></span> <a name="l00026"></a>00026 <span class="preprocessor">#include <stdbool.h></span> <a name="l00027"></a>00027 <span class="preprocessor">#include "slv2/types.h"</span> <a name="l00028"></a>00028 <a name="l00038"></a>00038 SLV2Value <a name="l00039"></a>00039 <a class="code" href="group__slv2__data.html#ga0a96f423b80bc7cc26f25082d7286c07" title="Create a new URI value.">slv2_value_new_uri</a>(SLV2World world, <span class="keyword">const</span> <span class="keywordtype">char</span>* uri); <a name="l00040"></a>00040 <a name="l00041"></a>00041 <a name="l00046"></a>00046 SLV2Value <a name="l00047"></a>00047 <a class="code" href="group__slv2__data.html#ga18b68eed0a452beb856fd1e2c4f47ecb" title="Create a new string value (with no language).">slv2_value_new_string</a>(SLV2World world, <span class="keyword">const</span> <span class="keywordtype">char</span>* str); <a name="l00048"></a>00048 <a name="l00049"></a>00049 <a name="l00054"></a>00054 SLV2Value <a name="l00055"></a>00055 <a class="code" href="group__slv2__data.html#gaebea0476cc48d7b073d462a3b2e08405" title="Create a new integer value.">slv2_value_new_int</a>(SLV2World world, <span class="keywordtype">int</span> val); <a name="l00056"></a>00056 <a name="l00057"></a>00057 <a name="l00062"></a>00062 SLV2Value <a name="l00063"></a>00063 <a class="code" href="group__slv2__data.html#ga4da6190a9c48f212d7ccd2470fce4db1" title="Create a new floating point value.">slv2_value_new_float</a>(SLV2World world, <span class="keywordtype">float</span> val); <a name="l00064"></a>00064 <a name="l00065"></a>00065 <a name="l00068"></a>00068 <span class="keywordtype">void</span> <a name="l00069"></a>00069 <a class="code" href="group__slv2__data.html#ga4bdbf360ae93917d8314249372265ea0" title="Free an SLV2Value.">slv2_value_free</a>(SLV2Value val); <a name="l00070"></a>00070 <a name="l00071"></a>00071 <a name="l00074"></a>00074 SLV2Value <a name="l00075"></a>00075 <a class="code" href="group__slv2__data.html#ga3054adf206b7c19bce9a637e8c549d64" title="Duplicate an SLV2Value.">slv2_value_duplicate</a>(SLV2Value val); <a name="l00076"></a>00076 <a name="l00077"></a>00077 <a name="l00080"></a>00080 <span class="keywordtype">bool</span> <a name="l00081"></a>00081 <a class="code" href="group__slv2__data.html#ga6d3f52ab4e768fdf0d25f85765a24562" title="Return whether two values are equivalent.">slv2_value_equals</a>(SLV2Value value, SLV2Value other); <a name="l00082"></a>00082 <a name="l00083"></a>00083 <a name="l00094"></a>00094 <span class="keywordtype">char</span>* <a name="l00095"></a>00095 <a class="code" href="group__slv2__data.html#ga25d7efc1abcff0469c056cd1b139e982" title="Return this value as a Turtle/SPARQL token.">slv2_value_get_turtle_token</a>(SLV2Value value); <a name="l00096"></a>00096 <a name="l00097"></a>00097 <a name="l00102"></a>00102 <span class="keywordtype">bool</span> <a name="l00103"></a>00103 <a class="code" href="group__slv2__data.html#gabab9b64123b1c9abee3dec719224647a" title="Return whether the value is a URI (resource).">slv2_value_is_uri</a>(SLV2Value value); <a name="l00104"></a>00104 <a name="l00105"></a>00105 <a name="l00113"></a>00113 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a name="l00114"></a>00114 <a class="code" href="group__slv2__data.html#ga5ad00da6a1acef55ae8382b86174310f" title="Return this value as a URI string, e.g.">slv2_value_as_uri</a>(SLV2Value value); <a name="l00115"></a>00115 <a name="l00116"></a>00116 <a name="l00117"></a>00117 <span class="preprocessor">#if 0</span> <a name="l00118"></a>00118 <span class="preprocessor"></span> <a name="l00125"></a>00125 <span class="keywordtype">bool</span> <a name="l00126"></a>00126 slv2_value_is_qname(SLV2Value value); <a name="l00127"></a>00127 <a name="l00128"></a>00128 <a name="l00136"></a>00136 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a name="l00137"></a>00137 slv2_value_as_qname(SLV2Value value); <a name="l00138"></a>00138 <span class="preprocessor">#endif</span> <a name="l00139"></a>00139 <span class="preprocessor"></span> <a name="l00140"></a>00140 <a name="l00147"></a>00147 <span class="keywordtype">bool</span> <a name="l00148"></a>00148 <a class="code" href="group__slv2__data.html#gab73bfc273924747e6b2a976c4c8099f7" title="Return whether this value is a literal (i.e.">slv2_value_is_literal</a>(SLV2Value value); <a name="l00149"></a>00149 <a name="l00150"></a>00150 <a name="l00157"></a>00157 <span class="keywordtype">bool</span> <a name="l00158"></a>00158 <a class="code" href="group__slv2__data.html#ga6d483d0598878e523076dd2f9c0ea34b" title="Return whether this value is a string literal.">slv2_value_is_string</a>(SLV2Value value); <a name="l00159"></a>00159 <a name="l00160"></a>00160 <a name="l00165"></a>00165 <span class="keyword">const</span> <span class="keywordtype">char</span>* <a name="l00166"></a>00166 <a class="code" href="group__slv2__data.html#gabac4b515ec6b2e4eebc9e9cc49235c77" title="Return value as a string.">slv2_value_as_string</a>(SLV2Value value); <a name="l00167"></a>00167 <a name="l00168"></a>00168 <a name="l00173"></a>00173 <span class="keywordtype">bool</span> <a name="l00174"></a>00174 <a class="code" href="group__slv2__data.html#gad7dcddcc5cab032236be74f6bc3b3510" title="Return whether this value is a decimal literal.">slv2_value_is_float</a>(SLV2Value value); <a name="l00175"></a>00175 <a name="l00176"></a>00176 <a name="l00184"></a>00184 <span class="keywordtype">float</span> <a name="l00185"></a>00185 <a class="code" href="group__slv2__data.html#ga1d149f0ec177379900fa4ba24c33c9c8" title="Return value as a float.">slv2_value_as_float</a>(SLV2Value value); <a name="l00186"></a>00186 <a name="l00187"></a>00187 <a name="l00192"></a>00192 <span class="keywordtype">bool</span> <a name="l00193"></a>00193 <a class="code" href="group__slv2__data.html#ga23ea579585f04260f598edd13cd37588" title="Return whether this value is an integer literal.">slv2_value_is_int</a>(SLV2Value value); <a name="l00194"></a>00194 <a name="l00195"></a>00195 <a name="l00202"></a>00202 <span class="keywordtype">int</span> <a name="l00203"></a>00203 <a class="code" href="group__slv2__data.html#ga5ca26c759000fa402cc1c248172d5f69" title="Return value as an integer.">slv2_value_as_int</a>(SLV2Value value); <a name="l00204"></a>00204 <a name="l00205"></a>00205 <a name="l00208"></a>00208 <span class="preprocessor">#ifdef __cplusplus</span> <a name="l00209"></a>00209 <span class="preprocessor"></span>} <span class="comment">/* extern "C" */</span> <a name="l00210"></a>00210 <span class="preprocessor">#endif</span> <a name="l00211"></a>00211 <span class="preprocessor"></span> <a name="l00212"></a>00212 <span class="preprocessor">#endif </span><span class="comment">/* __SLV2_VALUE_H__ */</span> </pre></div></div> </div> <hr size="1"><address style="text-align: right;"><small> Generated for SLV2 by <a href="http://www.doxygen.org/ index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.7.1</small></address> </body> </html>