diff options
author | David Robillard <d@drobilla.net> | 2011-02-16 18:08:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-16 18:08:45 +0000 |
commit | 0fb533abe4f1c9fdf5e9d7842f3a3f1cc9136e79 (patch) | |
tree | ba518138bb594a67a89b475d46324651a974e850 /sord/sord.h | |
parent | ffec133350bad76a1a87427b75edbded52b1d255 (diff) | |
download | sord-0fb533abe4f1c9fdf5e9d7842f3a3f1cc9136e79.tar.gz sord-0fb533abe4f1c9fdf5e9d7842f3a3f1cc9136e79.tar.bz2 sord-0fb533abe4f1c9fdf5e9d7842f3a3f1cc9136e79.zip |
Make serd.h C++ safe.
Add C++ API (serdmm.hpp).
Add serialisation API (easily write models to files).
git-svn-id: http://svn.drobilla.net/sord/trunk@36 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'sord/sord.h')
-rw-r--r-- | sord/sord.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sord/sord.h b/sord/sord.h index 6b00268..f1169f9 100644 --- a/sord/sord.h +++ b/sord/sord.h @@ -22,9 +22,15 @@ #ifndef SORD_SORD_H #define SORD_SORD_H +#ifdef __cplusplus +extern "C" { +#endif + #include <stdbool.h> #include <stdint.h> +#include "serd/serd.h" + #if defined _WIN32 || defined __CYGWIN__ #define SORD_LIB_IMPORT __declspec(dllimport) #define SORD_LIB_EXPORT __declspec(dllexport) @@ -330,8 +336,29 @@ sord_read_file_handle(SordModel model, const SordNode graph, const uint8_t* blank_prefix); +SORD_API +bool +sord_write_file(SordModel model, + SerdEnv env, + const uint8_t* uri, + const SordNode graph, + const uint8_t* blank_prefix); + +SORD_API +bool +sord_write_file_handle(SordModel model, + SerdEnv env, + FILE* fd, + const uint8_t* base_uri, + const SordNode graph, + const uint8_t* blank_prefix); + /** @} */ /** @} */ +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif // SORD_SORD_H |