From 19928bb583e72802746b89e322f71ecc0fcb7427 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 May 2009 04:05:32 +0000 Subject: The great ID refactoring of 2009. Path is now actually URI (scheme path: for now). Therefore ingen nodes and such live in the same namespace as ... well, everything. Including plugins. Thar be profit, laddies. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1992 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/DeprecatedLoader.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/client/DeprecatedLoader.cpp') diff --git a/src/client/DeprecatedLoader.cpp b/src/client/DeprecatedLoader.cpp index 5a315813..c0591609 100644 --- a/src/client/DeprecatedLoader.cpp +++ b/src/client/DeprecatedLoader.cpp @@ -36,8 +36,10 @@ #define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#" using namespace std; +using namespace Raul; namespace Ingen { +using namespace Shared; namespace Client { @@ -48,21 +50,21 @@ namespace Client { class ControlModel { public: - ControlModel(const Path& port_path, float value) + ControlModel(const Raul::Path& port_path, float value) : _port_path(port_path) , _value(value) { assert(_port_path.find("//") == string::npos); } - const Path& port_path() const { return _port_path; } - void port_path(const string& p) { _port_path = p; } - float value() const { return _value; } - void value(float v) { _value = v; } + const Raul::Path& port_path() const { return _port_path; } + void port_path(const string& p) { _port_path = p; } + float value() const { return _value; } + void value(float v) { _value = v; } private: - Path _port_path; - float _value; + Raul::Path _port_path; + float _value; }; @@ -289,7 +291,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename, poly = 1; // Create it, if we're not merging - if (!existing && path != "/") { + if (!existing && !path.is_root()) { _engine->new_patch(path, poly); for (GraphObject::Properties::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i) _engine->set_variable(path, i->first, i->second); @@ -333,7 +335,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename, list::const_iterator i = pm->controls().begin(); for ( ; i != pm->controls().end(); ++i) { const float value = i->value(); - _engine->set_port_value(translate_load_path(i->port_path()), Atom(value)); + _engine->set_port_value(translate_load_path(i->port_path().str()), Atom(value)); } } else { cerr << "WARNING: Unknown preset: \"" << pm->name() << endl; @@ -354,7 +356,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename, _load_path_translations.clear(); - return path; + return path.str(); } -- cgit v1.2.1