diff options
author | David Robillard <d@drobilla.net> | 2007-02-14 03:28:12 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-02-14 03:28:12 +0000 |
commit | fedfa21db3957ea425ef9282566ffcd5804a0e76 (patch) | |
tree | 971c554c11b53b4d0530b8548159de82cc745e48 /raul/RDFWriter.h | |
parent | 5dac076bbe695e76060811e4c767ed9d1b832cb6 (diff) | |
download | raul-fedfa21db3957ea425ef9282566ffcd5804a0e76.tar.gz raul-fedfa21db3957ea425ef9282566ffcd5804a0e76.tar.bz2 raul-fedfa21db3957ea425ef9282566ffcd5804a0e76.zip |
Serialization work on Machina.
git-svn-id: http://svn.drobilla.net/lad/raul@306 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/RDFWriter.h')
-rw-r--r-- | raul/RDFWriter.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/raul/RDFWriter.h b/raul/RDFWriter.h index fbd81a5..9a5d5b3 100644 --- a/raul/RDFWriter.h +++ b/raul/RDFWriter.h @@ -29,13 +29,16 @@ namespace Raul { class RdfId { public: - enum Type { ANONYMOUS, RESOURCE }; + enum Type { NULL_ID, ANONYMOUS, RESOURCE }; RdfId(Type t, const std::string& s) : _type(t), _string(s) {} + RdfId() : _type(NULL_ID) {} Type type() const { return _type; } const std::string& to_string() const { return _string; } + operator bool() { return (_type != NULL_ID); } + private: Type _type; std::string _string; ///< URI or blank node ID, depending on _type @@ -53,6 +56,8 @@ public: void start_to_string() throw (std::logic_error); std::string finish() throw (std::logic_error); + RdfId blank_id(); + bool serialization_in_progress() { return (_serializer != NULL); } void write(const RdfId& subject, @@ -69,6 +74,8 @@ private: raptor_serializer* _serializer; unsigned char* _string_output; Namespaces _prefixes; + + size_t _next_blank_id; }; |