From 5bc02bf31c689fe4a3758c8b484d220d4de33992 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 3 Feb 2011 04:43:37 +0000 Subject: Add SordTupleIndex enumeration for more readable Tuple code. Add sord_node_equals. Add sord_read_file_handle and add graph URI parameter to sord_read_file. Resolve relative URIs when parsing into a model. Read literal datatype or language when parsing into a model. Bettern debug printing. Add GOPS index by default. Add export_indluces to library in wscript for building against sord locally. git-svn-id: http://svn.drobilla.net/sord/trunk@15 3d64ff67-21c5-427c-a301-fe4f08042e5a --- sord/sord.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'sord') diff --git a/sord/sord.h b/sord/sord.h index 4720e76..5b05587 100644 --- a/sord/sord.h +++ b/sord/sord.h @@ -64,6 +64,13 @@ typedef int SordCount; ///< Count of nodes or triples */ typedef SordID SordTuple[4]; +typedef enum { + SORD_SUBJECT = 0, + SORD_PREDICATE = 1, + SORD_OBJECT = 2, + SORD_GRAPH = 3 +} SordTupleIndex; + /** Type of a node */ typedef enum { SORD_URI = 1, ///< URI @@ -231,6 +238,9 @@ SORD_API SordNode sord_literal_get_datatype(SordNode node); +SORD_API +bool +sord_node_equals(const SordNode a, const SordNode b); /** @} */ /** @name Read Operations @@ -348,7 +358,16 @@ sord_tuple_match(const SordTuple x, const SordTuple y); SORD_API bool -sord_read_file(Sord sord, const uint8_t* uri); +sord_read_file(Sord sord, + const uint8_t* uri, + const SordNode graph); + +SORD_API +bool +sord_read_file_handle(Sord sord, + FILE* fd, + const uint8_t* base_uri, + const SordNode graph); /** @} */ -- cgit v1.2.1