diff options
author | David Robillard <d@drobilla.net> | 2009-12-30 15:48:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-12-30 15:48:50 +0000 |
commit | 715d577a38d04a98405a015fd18d49c0fed40c21 (patch) | |
tree | 02102070145066128a6ff4181256da59c63aacf7 /src/shared | |
parent | 87be66d677b1947ef1b5f866c44b0beb1263ac17 (diff) | |
download | ingen-715d577a38d04a98405a015fd18d49c0fed40c21.tar.gz ingen-715d577a38d04a98405a015fd18d49c0fed40c21.tar.bz2 ingen-715d577a38d04a98405a015fd18d49c0fed40c21.zip |
Fix renaming (fix ticket #458).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2324 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/ResourceImpl.cpp | 9 | ||||
-rw-r--r-- | src/shared/ResourceImpl.hpp | 4 |
2 files changed, 11 insertions, 2 deletions
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; |