SLV2 0.6.6
value.h
1/* SLV2
2 * Copyright (C) 2007-2009 Dave Robillard <http://drobilla.net>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
7 * any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#ifndef __SLV2_VALUE_H__
20#define __SLV2_VALUE_H__
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#include <stdbool.h>
27#include "slv2/types.h"
28
32
33
38SLV2Value
39slv2_value_new_uri(SLV2World world, const char* uri);
40
41
46SLV2Value
47slv2_value_new_string(SLV2World world, const char* str);
48
49
54SLV2Value
55slv2_value_new_int(SLV2World world, int val);
56
57
62SLV2Value
63slv2_value_new_float(SLV2World world, float val);
64
65
68void
69slv2_value_free(SLV2Value val);
70
71
74SLV2Value
75slv2_value_duplicate(SLV2Value val);
76
77
80bool
81slv2_value_equals(SLV2Value value, SLV2Value other);
82
83
94char*
96
97
102bool
103slv2_value_is_uri(SLV2Value value);
104
105
113const char*
114slv2_value_as_uri(SLV2Value value);
115
116
117#if 0
125bool
126slv2_value_is_qname(SLV2Value value);
127
128
136const char*
137slv2_value_as_qname(SLV2Value value);
138#endif
139
140
147bool
148slv2_value_is_literal(SLV2Value value);
149
150
157bool
158slv2_value_is_string(SLV2Value value);
159
160
165const char*
166slv2_value_as_string(SLV2Value value);
167
168
173bool
174slv2_value_is_float(SLV2Value value);
175
176
184float
185slv2_value_as_float(SLV2Value value);
186
187
192bool
193slv2_value_is_int(SLV2Value value);
194
195
202int
203slv2_value_as_int(SLV2Value value);
204
205
207
208#ifdef __cplusplus
209} /* extern "C" */
210#endif
211
212#endif /* __SLV2_VALUE_H__ */
SLV2Value slv2_value_new_uri(SLV2World world, const char *uri)
Create a new URI value.
SLV2Value slv2_value_new_string(SLV2World world, const char *str)
Create a new string value (with no language).
float slv2_value_as_float(SLV2Value value)
Return value as a float.
bool slv2_value_is_int(SLV2Value value)
Return whether this value is an integer literal.
SLV2Value slv2_value_duplicate(SLV2Value val)
Duplicate an SLV2Value.
const char * slv2_value_as_uri(SLV2Value value)
Return this value as a URI string, e.g.
void slv2_value_free(SLV2Value val)
Free an SLV2Value.
SLV2Value slv2_value_new_float(SLV2World world, float val)
Create a new floating point value.
int slv2_value_as_int(SLV2Value value)
Return value as an integer.
bool slv2_value_equals(SLV2Value value, SLV2Value other)
Return whether two values are equivalent.
bool slv2_value_is_string(SLV2Value value)
Return whether this value is a string literal.
bool slv2_value_is_literal(SLV2Value value)
Return whether this value is a literal (i.e.
bool slv2_value_is_uri(SLV2Value value)
Return whether the value is a URI (resource).
bool slv2_value_is_float(SLV2Value value)
Return whether this value is a decimal literal.
char * slv2_value_get_turtle_token(SLV2Value value)
Return this value as a Turtle/SPARQL token.
SLV2Value slv2_value_new_int(SLV2World world, int val)
Create a new integer value.
const char * slv2_value_as_string(SLV2Value value)
Return value as a string.

Generated for SLV2 by doxygen 1.13.2