aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-10-21 20:57:33 +0200
committerDavid Robillard <d@drobilla.net>2022-01-13 23:04:05 -0500
commit89be71eabefcc55a3d0a56d7bed7124c4fdafbd8 (patch)
tree6c2b019b462999d1178441943d1cf90c4bd7b17c /include/serd/serd.h
parentaca4640882aab7da0193ee2f5767ecd6d9506b0c (diff)
downloadserd-89be71eabefcc55a3d0a56d7bed7124c4fdafbd8.tar.gz
serd-89be71eabefcc55a3d0a56d7bed7124c4fdafbd8.tar.bz2
serd-89be71eabefcc55a3d0a56d7bed7124c4fdafbd8.zip
Simplify streaming API and improve pretty printing
This removes the obligation from the caller to correctly maintain flags to describe the current anonymous context, instead making the writer handle this itself as much as possible. Flags remain for the cases the writer can not infer from context: the start of anonymous subject and object nodes.
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r--include/serd/serd.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index da4291c6..06e11966 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -1246,14 +1246,11 @@ typedef enum {
/// Flags indicating inline abbreviation information for a statement
typedef enum {
- SERD_EMPTY_S = 1u << 1u, ///< Empty blank node subject
- SERD_EMPTY_O = 1u << 2u, ///< Empty blank node object
- SERD_ANON_S_BEGIN = 1u << 3u, ///< Start of anonymous subject
- SERD_ANON_O_BEGIN = 1u << 4u, ///< Start of anonymous object
- SERD_ANON_CONT = 1u << 5u, ///< Continuation of anonymous node
- SERD_LIST_S_BEGIN = 1u << 6u, ///< Start of list subject
- SERD_LIST_O_BEGIN = 1u << 7u, ///< Start of list object
- SERD_LIST_CONT = 1u << 8u ///< Continuation of list
+ SERD_EMPTY_S = 1u << 0u, ///< Empty blank node subject
+ SERD_ANON_S = 1u << 1u, ///< Start of anonymous subject
+ SERD_ANON_O = 1u << 2u, ///< Start of anonymous object
+ SERD_LIST_S = 1u << 3u, ///< Start of list subject
+ SERD_LIST_O = 1u << 4u ///< Start of list object
} SerdStatementFlag;
/// Bitwise OR of SerdStatementFlag values