diff options
author | David Robillard <d@drobilla.net> | 2011-03-17 18:57:31 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-03-17 18:57:31 +0000 |
commit | 71068dae1e369f5cedb3b52d3b5bc4f754d100e4 (patch) | |
tree | 364c81f4c3770be46793d6a39ea879aae2090438 /serd | |
parent | 4070ff8b09e4ab932614bbd1b0e36976a221e52e (diff) | |
download | serd-71068dae1e369f5cedb3b52d3b5bc4f754d100e4.tar.gz serd-71068dae1e369f5cedb3b52d3b5bc4f754d100e4.tar.bz2 serd-71068dae1e369f5cedb3b52d3b5bc4f754d100e4.zip |
Improve documentation.
git-svn-id: http://svn.drobilla.net/serd/trunk@123 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/serd/serd.h b/serd/serd.h index 040054b4..c19f9f24 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -192,9 +192,14 @@ typedef enum { } SerdType; /** - @name SerdURI - @{ + A syntactic RDF node. */ +typedef struct { + SerdType type; + size_t n_bytes; /**< Size in bytes (including null) */ + size_t n_chars; /**< Length in characters */ + const uint8_t* buf; /**< Buffer */ +} SerdNode; /** An unterminated string fragment. @@ -220,6 +225,26 @@ typedef struct { SerdChunk fragment; /**< Fragment */ } SerdURI; +/** + Syntax style options. + + The style of the writer output can be controlled by ORing together + values from this enumeration. Note that some options are only supported + for some syntaxes (e.g. NTriples does not support any options except + @ref SERD_STYLE_ASCII, which is required). +*/ +typedef enum { + SERD_STYLE_ABBREVIATED = 1, /**< Abbreviate triples when possible. */ + SERD_STYLE_ASCII = 1 << 1, /**< Escape all non-ASCII characters. */ + SERD_STYLE_RESOLVED = 1 << 2, /**< Resolve relative URIs against base. */ + SERD_STYLE_CURIED = 1 << 3 /**< Shorten URIs into CURIEs. */ +} SerdStyle; + +/** + @name URI + @{ +*/ + static const SerdURI SERD_URI_NULL = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}; /** @@ -257,20 +282,10 @@ serd_uri_serialise(const SerdURI* uri, SerdSink sink, void* stream); /** @} - @name SerdNode + @name Node @{ */ -/** - A syntactic RDF node. -*/ -typedef struct { - SerdType type; - size_t n_bytes; /**< Size in bytes (including null) */ - size_t n_chars; /**< Length in characters */ - const uint8_t* buf; /**< Buffer */ -} SerdNode; - static const SerdNode SERD_NODE_NULL = { SERD_NOTHING, 0, 0, 0 }; /** @@ -335,7 +350,7 @@ serd_node_free(SerdNode* node); /** @} - @name Handlers + @name Event Handlers @{ */ @@ -381,7 +396,7 @@ typedef bool (*SerdEndSink)(void* handle, /** @} - @name SerdEnv + @name Environment @{ */ @@ -439,7 +454,7 @@ serd_env_foreach(const SerdEnv env, /** @} - @name SerdReader + @name Reader @{ */ @@ -545,17 +560,10 @@ serd_read_state_set_prefix(SerdReadState state, /** @} - @name SerdWriter + @name Writer @{ */ -typedef enum { - SERD_STYLE_ABBREVIATED = 1, /**< Abbreviate triples when possible. */ - SERD_STYLE_ASCII = 1 << 1, /**< Escape all non-ASCII characters. */ - SERD_STYLE_RESOLVED = 1 << 2, /**< Resolve relative URIs against base. */ - SERD_STYLE_CURIED = 1 << 3 /**< Shorten URIs into CURIEs. */ -} SerdStyle; - /** Create a new RDF writer. */ |