From 715d577a38d04a98405a015fd18d49c0fed40c21 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 30 Dec 2009 15:48:50 +0000 Subject: Fix renaming (fix ticket #458). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2324 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/ResourceImpl.cpp | 9 ++++++++- src/shared/ResourceImpl.hpp | 4 +++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/shared') diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp index 6af25ef0..93d6ea03 100644 --- a/src/shared/ResourceImpl.cpp +++ b/src/shared/ResourceImpl.cpp @@ -25,8 +25,15 @@ namespace Ingen { namespace Shared { +bool +ResourceImpl::is_meta_uri(const Raul::URI& uri) +{ + return uri.substr(0, 6) == "meta:#"; +} + + const Raul::URI -ResourceImpl::meta_uri(const Raul::URI& base, const Raul::URI& uri) +ResourceImpl::meta_uri(const Raul::URI& uri) { return string("meta:#") + uri.chop_start("/"); } diff --git a/src/shared/ResourceImpl.hpp b/src/shared/ResourceImpl.hpp index 9b10ec15..b4afc50a 100644 --- a/src/shared/ResourceImpl.hpp +++ b/src/shared/ResourceImpl.hpp @@ -32,6 +32,7 @@ class ResourceImpl : virtual public Resource public: ResourceImpl(const Raul::URI& uri) : _uri(uri) {} + virtual void set_uri(const Raul::URI& uri) { _uri = uri; } virtual const Raul::URI uri() const { return _uri.str(); } const Properties& properties() const { return _properties; } @@ -55,7 +56,8 @@ public: bool& node, bool& port, bool& is_output, PortType& data_type); - static const Raul::URI meta_uri(const Raul::URI& base, const Raul::URI& uri); + static bool is_meta_uri(const Raul::URI& uri); + static const Raul::URI meta_uri(const Raul::URI& uri); protected: Raul::Atom& set_property(const Raul::URI& uri, const Raul::Atom& value) const; -- cgit v1.2.1