diff options
author | David Robillard <d@drobilla.net> | 2018-12-29 20:05:00 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | 41c4935f03caef37baff3d22310b90abd300fd02 (patch) | |
tree | 69bea30ba4292d94f187659837cf8f204f7ab8c2 /include/serd/serd.h | |
parent | 7a179e568a3576819d0e600cf35c94051e107d33 (diff) | |
download | serd-41c4935f03caef37baff3d22310b90abd300fd02.tar.gz serd-41c4935f03caef37baff3d22310b90abd300fd02.tar.bz2 serd-41c4935f03caef37baff3d22310b90abd300fd02.zip |
Rename SerdStyle to SerdWriterFlags
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r-- | include/serd/serd.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index c2308b16..c7ff1358 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -815,25 +815,28 @@ serd_reader_free(SerdReader* SERD_NULLABLE reader); typedef struct SerdWriterImpl SerdWriter; /** - Syntax style options. + Writer style options. These flags allow more precise control of writer output style. Note that some options are only supported for some syntaxes, for example, NTriples does not support abbreviation and is always ASCII. */ typedef enum { - SERD_STYLE_ABBREVIATED = 1U << 0U, ///< Abbreviate triples when possible. - SERD_STYLE_ASCII = 1U << 1U, ///< Escape all non-ASCII characters. - SERD_STYLE_RESOLVED = 1U << 2U, ///< Resolve URIs against base URI. - SERD_STYLE_CURIED = 1U << 3U, ///< Shorten URIs into CURIEs. - SERD_STYLE_BULK = 1U << 4U, ///< Write output in pages. - SERD_STYLE_STRICT = 1U << 5U, ///< Abort with error on lossy output -} SerdStyle; + SERD_WRITE_ABBREVIATED = 1U << 0U, ///< Abbreviate triples when possible + SERD_WRITE_ASCII = 1U << 1U, ///< Escape all non-ASCII characters + SERD_WRITE_RESOLVED = 1U << 2U, ///< Resolve URIs against base URI + SERD_WRITE_CURIED = 1U << 3U, ///< Shorten URIs into CURIEs + SERD_WRITE_BULK = 1U << 4U, ///< Write output in pages + SERD_WRITE_STRICT = 1U << 5U, ///< Abort with error on lossy output +} SerdWriterFlag; + +/// Bitwise OR of SerdWriterFlag values +typedef uint32_t SerdWriterFlags; /// Create a new RDF writer SERD_API SerdWriter* SERD_ALLOCATED serd_writer_new(SerdSyntax syntax, - SerdStyle style, + SerdWriterFlags flags, SerdEnv* SERD_NONNULL env, const SerdURIView* SERD_NULLABLE base_uri, SerdSink SERD_NONNULL ssink, |