diff options
author | David Robillard <d@drobilla.net> | 2018-02-04 12:40:45 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:03 +0200 |
commit | 6eebfed8b6d3ca10602ae0842d4961d867c766a9 (patch) | |
tree | cb93a96ff85f1c0e985645e5fb130dbfa79a5fa4 /serd | |
parent | 310779cce9bdfa7868cb09f4245b002c2abe1204 (diff) | |
download | serd-6eebfed8b6d3ca10602ae0842d4961d867c766a9.tar.gz serd-6eebfed8b6d3ca10602ae0842d4961d867c766a9.tar.bz2 serd-6eebfed8b6d3ca10602ae0842d4961d867c766a9.zip |
Add node accessor API
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/serd/serd.h b/serd/serd.h index f548d15f..c4bb0381 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -599,6 +599,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_get_type(const SerdNode* node); + +/** + Return the string value of a node. +*/ +SERD_API +const char* +serd_node_get_string(const SerdNode* node); + +/** + Return the length of the string value of a node in bytes. +*/ +SERD_API +size_t +serd_node_get_length(const SerdNode* node); + +/** + Return the flags (string properties) of a node. +*/ +SERD_API +SerdNodeFlags +serd_node_get_flags(const SerdNode* node); + +/** Return true iff `a` is equal to `b`. */ SERD_API |