From cb42d2cc4daa09c7d1db5515e39e94b9a5a43447 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 2 Dec 2008 05:49:41 +0000 Subject: Rewrite pretty much everything to do with paths in Serialiser to actually make an ounce of sense. Fix various things with nested patches (fix tickets #286 #289). Cascade successive pastes nicely. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1840 a436a847-0d15-0410-975c-d299462d15a1 --- src/serialisation/Parser.hpp | 46 ++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 25 deletions(-) (limited to 'src/serialisation/Parser.hpp') diff --git a/src/serialisation/Parser.hpp b/src/serialisation/Parser.hpp index a5db7c0d..0d5c4f7e 100644 --- a/src/serialisation/Parser.hpp +++ b/src/serialisation/Parser.hpp @@ -27,7 +27,7 @@ #include "interface/GraphObject.hpp" #include "module/World.hpp" -namespace Redland { class World; class Model; } +namespace Redland { class World; class Model; class Node; } namespace Ingen { namespace Shared { class CommonInterface; } } using namespace Ingen::Shared; @@ -44,8 +44,8 @@ public: Ingen::Shared::World* world, Shared::CommonInterface* target, Glib::ustring document_uri, - Glib::ustring engine_base, - Glib::ustring object_uri, + boost::optional data_path=boost::optional(), + boost::optional parent=boost::optional(), boost::optional symbol=boost::optional(), boost::optional data=boost::optional()); @@ -54,8 +54,8 @@ public: Shared::CommonInterface* target, const Glib::ustring& str, const Glib::ustring& base_uri, - Glib::ustring engine_base, - boost::optional object_uri=boost::optional(), + boost::optional data_path=boost::optional(), + boost::optional parent=boost::optional(), boost::optional symbol=boost::optional(), boost::optional data=boost::optional()); @@ -64,22 +64,22 @@ public: Shared::CommonInterface* target, const Glib::ustring& str, const Glib::ustring& base_uri, - Glib::ustring engine_base, - boost::optional object_uri=boost::optional(), + boost::optional data_path=boost::optional(), + boost::optional parent=boost::optional(), boost::optional symbol=boost::optional(), boost::optional data=boost::optional()); private: - Glib::ustring uri_relative_to_base(Glib::ustring base, const Glib::ustring uri); + Glib::ustring relative_uri(Glib::ustring base, const Glib::ustring uri); boost::optional parse( Ingen::Shared::World* world, Shared::CommonInterface* target, Redland::Model& model, - Glib::ustring base_uri, - Glib::ustring engine_base, - boost::optional object_uri=boost::optional(), + Glib::ustring document_uri, + boost::optional data_path=boost::optional(), + boost::optional parent=boost::optional(), boost::optional symbol=boost::optional(), boost::optional data=boost::optional()); @@ -87,26 +87,24 @@ private: Ingen::Shared::World* world, Ingen::Shared::CommonInterface* target, Redland::Model& model, - const Glib::ustring& base_uri, - Glib::ustring engine_base, - const Glib::ustring& object_uri, - boost::optional data); + const Redland::Node& subject, + boost::optional parent=boost::optional(), + boost::optional symbol=boost::optional(), + boost::optional data=boost::optional()); boost::optional parse_node( Ingen::Shared::World* world, Ingen::Shared::CommonInterface* target, Redland::Model& model, - const Glib::ustring& base_uri, - const Glib::ustring& subject, + const Redland::Node& subject, const Raul::Path& path, - boost::optional data); + boost::optional data=boost::optional()); boost::optional parse_port( Ingen::Shared::World* world, Ingen::Shared::CommonInterface* target, Redland::Model& model, - const Glib::ustring& base_uri, - const Glib::ustring& subject, + const Redland::Node& subject, const Raul::Path& path, boost::optional data=boost::optional()); @@ -114,18 +112,16 @@ private: Ingen::Shared::World* world, Ingen::Shared::CommonInterface* target, Redland::Model& model, - const Glib::ustring& base_uri, - const Glib::ustring& subject, + const Redland::Node& subject, const Raul::Path& path, - boost::optional data); + boost::optional data=boost::optional()); bool parse_connections( Ingen::Shared::World* world, Ingen::Shared::CommonInterface* target, Redland::Model& model, - const Glib::ustring& base_uri, const Glib::ustring& subject, - const Raul::Path& parent); + const Raul::Path& patch); }; -- cgit v1.2.1