diff options
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; |