From fa9837f95a2d3be3f5eb94fcbf8222bb208d87db Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Oct 2008 21:50:38 +0000 Subject: Remove duplicated code for getting various hints, add generic hint accessor. Cleanup namespace pollution. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1650 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/PortModel.cpp | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'src/client/PortModel.cpp') diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp index c18378db..af257ebf 100644 --- a/src/client/PortModel.cpp +++ b/src/client/PortModel.cpp @@ -21,30 +21,12 @@ namespace Ingen { namespace Client { - -bool -PortModel::is_logarithmic() const -{ - const Atom& hint = get_variable("ingen:logarithmic"); - return (hint.is_valid() && hint.get_bool() > 0); -} - - bool -PortModel::is_integer() const +PortModel::has_hint(const std::string& qname) const { - const Atom& hint = get_variable("ingen:integer"); + const Atom& hint = get_variable(qname); return (hint.is_valid() && hint.get_bool() > 0); } - - -bool -PortModel::is_toggle() const -{ - const Atom& hint = get_variable("ingen:toggled"); - return (hint.is_valid() && hint.get_bool() > 0); -} - void PortModel::set(SharedPtr model) -- cgit v1.2.1