diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/ClashAvoider.cpp | 19 | ||||
-rw-r--r-- | src/shared/ClashAvoider.hpp | 5 |
2 files changed, 17 insertions, 7 deletions
diff --git a/src/shared/ClashAvoider.cpp b/src/shared/ClashAvoider.cpp index 24569369..4995aa5e 100644 --- a/src/shared/ClashAvoider.cpp +++ b/src/shared/ClashAvoider.cpp @@ -26,7 +26,16 @@ namespace Ingen { namespace Shared { -/** Always returns a valid Raul::Path */ +const URI +ClashAvoider::map_uri(const Raul::URI& in) +{ + if (in.scheme() == Path::scheme && Path::is_valid(in.str())) + return map_path(in.str()); + else + return in; +} + + const Path ClashAvoider::map_path(const Raul::Path& in) { @@ -192,20 +201,20 @@ ClashAvoider::disconnect(const Raul::Path& src_port_path, void -ClashAvoider::set_variable(const Raul::Path& subject_path, +ClashAvoider::set_variable(const Raul::URI& subject_path, const Raul::URI& predicate, const Raul::Atom& value) { - _target.set_variable(map_path(subject_path), predicate, value); + _target.set_variable(map_uri(subject_path), predicate, value); } void -ClashAvoider::set_property(const Raul::Path& subject_path, +ClashAvoider::set_property(const Raul::URI& subject_path, const Raul::URI& predicate, const Raul::Atom& value) { - _target.set_property(map_path(subject_path), predicate, value); + _target.set_property(map_uri(subject_path), predicate, value); } diff --git a/src/shared/ClashAvoider.hpp b/src/shared/ClashAvoider.hpp index 0692a59a..0334610d 100644 --- a/src/shared/ClashAvoider.hpp +++ b/src/shared/ClashAvoider.hpp @@ -70,11 +70,11 @@ public: virtual void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path); - virtual void set_variable(const Raul::Path& subject_path, + virtual void set_variable(const Raul::URI& subject_path, const Raul::URI& predicate, const Raul::Atom& value); - virtual void set_property(const Raul::Path& subject_path, + virtual void set_property(const Raul::URI& subject_path, const Raul::URI& predicate, const Raul::Atom& value); @@ -90,6 +90,7 @@ public: virtual void clear_patch(const Raul::Path& patch_path); private: + const Raul::URI map_uri(const Raul::URI& in); const Raul::Path map_path(const Raul::Path& in); Store& _store; |