summaryrefslogtreecommitdiffstats
path: root/src/client/PortModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-10-11 21:50:38 +0000
committerDavid Robillard <d@drobilla.net>2008-10-11 21:50:38 +0000
commitfa9837f95a2d3be3f5eb94fcbf8222bb208d87db (patch)
tree2eb8c8eb5a0cf1b27f34ddb141651743b66a2b1e /src/client/PortModel.cpp
parenta18022d4243de7b2093507c574689c7a17c82bb9 (diff)
downloadingen-fa9837f95a2d3be3f5eb94fcbf8222bb208d87db.tar.gz
ingen-fa9837f95a2d3be3f5eb94fcbf8222bb208d87db.tar.bz2
ingen-fa9837f95a2d3be3f5eb94fcbf8222bb208d87db.zip
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
Diffstat (limited to 'src/client/PortModel.cpp')
-rw-r--r--src/client/PortModel.cpp22
1 files changed, 2 insertions, 20 deletions
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<ObjectModel> model)