aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-02-04 12:40:45 +0100
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:58 +0100
commit562191c700143fc867092d828e850c81137a73e4 (patch)
treeaa42036b01f9dbd45ba72e2b435d2cf10b1239b6 /serd
parentca7b73aea47367e946c473dd235061e48effdb5f (diff)
downloadserd-562191c700143fc867092d828e850c81137a73e4.tar.gz
serd-562191c700143fc867092d828e850c81137a73e4.tar.bz2
serd-562191c700143fc867092d828e850c81137a73e4.zip
Add node accessor API
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h
index fdebc4d1..c0a8d013 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -603,6 +603,34 @@ SerdNode
serd_node_copy(const SerdNode* node);
/**
+ Return the type of a node (SERD_URI, SERD_BLANK, or SERD_LITERAL).
+*/
+SERD_API
+SerdType
+serd_node_type(const SerdNode* node);
+
+/**
+ Return the string value of a node.
+*/
+SERD_API
+const char*
+serd_node_string(const SerdNode* node);
+
+/**
+ Return the length of the string value of a node in bytes.
+*/
+SERD_API
+size_t
+serd_node_length(const SerdNode* node);
+
+/**
+ Return the flags (string properties) of a node.
+*/
+SERD_API
+SerdNodeFlags
+serd_node_flags(const SerdNode* node);
+
+/**
Return true iff `a` is equal to `b`.
*/
SERD_API