From f186268d94b6435614c58d369f157fa203b04850 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 3 Feb 2010 06:43:53 +0000 Subject: Properly detect lv2:portProperty. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2411 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/PortModel.cpp | 4 ++-- src/client/PortModel.hpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/client') diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp index a818b04f..80b97e61 100644 --- a/src/client/PortModel.cpp +++ b/src/client/PortModel.cpp @@ -35,9 +35,9 @@ PortModel::set_property(const Raul::URI& uri, bool -PortModel::has_hint(const std::string& qname) const +PortModel::port_property(const std::string& uri) const { - return has_property(Shared::LV2URIMap::instance().lv2_portProperty, qname); + return has_property(Shared::LV2URIMap::instance().lv2_portProperty, Raul::URI(uri)); } diff --git a/src/client/PortModel.hpp b/src/client/PortModel.hpp index b199d05b..6021ed19 100644 --- a/src/client/PortModel.hpp +++ b/src/client/PortModel.hpp @@ -48,11 +48,11 @@ public: inline bool is_input() const { return (_direction == INPUT); } inline bool is_output() const { return (_direction == OUTPUT); } - bool has_hint(const std::string& qname) const; + bool port_property(const std::string& uri) const; - bool is_logarithmic() const { return has_hint("http://drobilla.net/ns/ingen#logarithmic"); } - bool is_integer() const { return has_hint("http://lv2plug.in/ns/lv2core#integer"); } - bool is_toggle() const { return has_hint("http://lv2plug.in/ns/lv2core#toggled"); } + bool is_logarithmic() const { return port_property("http://drobilla.net/ns/ingen#logarithmic"); } + bool is_integer() const { return port_property("http://lv2plug.in/ns/lv2core#integer"); } + bool is_toggle() const { return port_property("http://lv2plug.in/ns/lv2core#toggled"); } inline bool operator==(const PortModel& pm) const { return (path() == pm.path()); } -- cgit v1.2.1