diff options
author | David Robillard <d@drobilla.net> | 2006-10-03 22:24:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-10-03 22:24:22 +0000 |
commit | 91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a (patch) | |
tree | cb70af457552eb1b87f745989f41c31da8220583 /src/libs/client/Serializer.h | |
parent | 35a5d92cfcf6815553a0939c3e2bf77c1108fd31 (diff) | |
download | ingen-91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a.tar.gz ingen-91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a.tar.bz2 ingen-91d5cb109563c67bdad5f3ebeaafc8e1e8f7e14a.zip |
shared_ptr bugfixes.
Updated Ingen to work with new FlowCanvas.
Updated Patchage to work with new(er) FlowCanvas.
git-svn-id: http://svn.drobilla.net/lad/ingen@152 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/Serializer.h')
-rw-r--r-- | src/libs/client/Serializer.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/libs/client/Serializer.h b/src/libs/client/Serializer.h index b2dbf000..a563dbb8 100644 --- a/src/libs/client/Serializer.h +++ b/src/libs/client/Serializer.h @@ -20,7 +20,8 @@ #include <map> #include <utility> #include <string> -#include <redland.h> +#include <stdexcept> +#include <raptor.h> #include <cassert> #include "util/CountedPtr.h" #include "util/Path.h" @@ -60,52 +61,51 @@ public: string find_file(const string& filename, const string& additional_path = ""); - void save_patch(CountedPtr<PatchModel> patch_model, const string& filename, bool recursive); - string load_patch(const string& filename, const string& parent_path, const string& name, size_t poly, MetadataMap initial_data, bool existing = false); + + void start_to_filename(const string& filename); + void start_to_string(); + + void serialize_patch(CountedPtr<PatchModel> patch) throw(std::logic_error); + + string finish() throw(std::logic_error); private: // Model -> RDF - void add_patch_to_rdf(librdf_model* rdf, - CountedPtr<PatchModel> patch, const string& uri); - - void add_node_to_rdf(librdf_model* rdf, + void add_node_to_rdf(raptor_serializer* rdf, CountedPtr<NodeModel> node, const string ns_prefix=""); - void add_port_to_rdf(librdf_model* rdf, + void add_port_to_rdf(raptor_serializer* rdf, CountedPtr<PortModel> port, const string ns_prefix=""); - void add_connection_to_rdf(librdf_model* rdf, + void add_connection_to_rdf(raptor_serializer* rdf, CountedPtr<ConnectionModel> connection, const string port_ns_prefix=""); // Triple -> RDF - void add_resource_to_rdf(librdf_model* model, + void add_resource_to_rdf(raptor_serializer* rdf, const string& subject_uri, const string& predicate_uri, const string& object_uri); - void add_resource_to_rdf(librdf_model* model, - librdf_node* subject, const string& predicate_uri, const string& object_uri); + //void add_resource_to_rdf(raptor_serializer* rdf + // librdf_node* subject, const string& predicate_uri, const string& object_uri); - void add_atom_to_rdf(librdf_model* model, + void add_atom_to_rdf(raptor_serializer* rdf, const string& subject_uri, const string& predicate_uri, const Atom& atom); - - void create(); - void destroy(); void setup_prefixes(); string expand_uri(const string& uri); - librdf_world* _world; - librdf_serializer* _serializer; + raptor_serializer* _serializer; + unsigned char* _string_output; string _patch_search_path; map<string, string> _prefixes; CountedPtr<ModelEngineInterface> _engine; |