SLV2 0.6.6
|
00001 /* SLV2 00002 * Copyright (C) 2007-2009 Dave Robillard <http://drobilla.net> 00003 * 00004 * This library is free software; you can redistribute it and/or modify it 00005 * under the terms of the GNU General Public License as published by the Free 00006 * Software Foundation; either version 2 of the License, or (at your option) 00007 * any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, but WITHOUT 00010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00012 * for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License along 00015 * with this program; if not, write to the Free Software Foundation, Inc., 00016 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 00017 */ 00018 00019 #ifndef __SLV2_VALUE_H__ 00020 #define __SLV2_VALUE_H__ 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 #include <stdbool.h> 00027 #include "slv2/types.h" 00028 00038 SLV2Value 00039 slv2_value_new_uri(SLV2World world, const char* uri); 00040 00041 00046 SLV2Value 00047 slv2_value_new_string(SLV2World world, const char* str); 00048 00049 00054 SLV2Value 00055 slv2_value_new_int(SLV2World world, int val); 00056 00057 00062 SLV2Value 00063 slv2_value_new_float(SLV2World world, float val); 00064 00065 00068 void 00069 slv2_value_free(SLV2Value val); 00070 00071 00074 SLV2Value 00075 slv2_value_duplicate(SLV2Value val); 00076 00077 00080 bool 00081 slv2_value_equals(SLV2Value value, SLV2Value other); 00082 00083 00094 char* 00095 slv2_value_get_turtle_token(SLV2Value value); 00096 00097 00102 bool 00103 slv2_value_is_uri(SLV2Value value); 00104 00105 00113 const char* 00114 slv2_value_as_uri(SLV2Value value); 00115 00116 00117 #if 0 00118 00125 bool 00126 slv2_value_is_qname(SLV2Value value); 00127 00128 00136 const char* 00137 slv2_value_as_qname(SLV2Value value); 00138 #endif 00139 00140 00147 bool 00148 slv2_value_is_literal(SLV2Value value); 00149 00150 00157 bool 00158 slv2_value_is_string(SLV2Value value); 00159 00160 00165 const char* 00166 slv2_value_as_string(SLV2Value value); 00167 00168 00173 bool 00174 slv2_value_is_float(SLV2Value value); 00175 00176 00184 float 00185 slv2_value_as_float(SLV2Value value); 00186 00187 00192 bool 00193 slv2_value_is_int(SLV2Value value); 00194 00195 00202 int 00203 slv2_value_as_int(SLV2Value value); 00204 00205 00208 #ifdef __cplusplus 00209 } /* extern "C" */ 00210 #endif 00211 00212 #endif /* __SLV2_VALUE_H__ */