summaryrefslogtreecommitdiffstats
path: root/include/ingen/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-03 02:18:42 +0000
committerDavid Robillard <d@drobilla.net>2011-10-03 02:18:42 +0000
commit8768c927968c2541bcac763d9a4f237081eaca4b (patch)
tree214b29607be379f4cab4d254562a9949677c5848 /include/ingen/client
parentaf70d4f1e0927ea3e89b78fdf0de4247a32a39b4 (diff)
downloadingen-8768c927968c2541bcac763d9a4f237081eaca4b.tar.gz
ingen-8768c927968c2541bcac763d9a4f237081eaca4b.tar.bz2
ingen-8768c927968c2541bcac763d9a4f237081eaca4b.zip
Remove static PortType enumeration from public/client side interface.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3523 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'include/ingen/client')
-rw-r--r--include/ingen/client/ObjectModel.hpp2
-rw-r--r--include/ingen/client/PortModel.hpp15
2 files changed, 7 insertions, 10 deletions
diff --git a/include/ingen/client/ObjectModel.hpp b/include/ingen/client/ObjectModel.hpp
index 50ba2805..6d4fbae5 100644
--- a/include/ingen/client/ObjectModel.hpp
+++ b/include/ingen/client/ObjectModel.hpp
@@ -55,6 +55,8 @@ class ObjectModel : virtual public GraphObject
public:
virtual ~ObjectModel();
+ bool is_a(const Raul::URI& type) const;
+
const Raul::Atom& get_property(const Raul::URI& key) const;
const Raul::Atom& set_property(const Raul::URI& key,
diff --git a/include/ingen/client/PortModel.hpp b/include/ingen/client/PortModel.hpp
index 7fd4d746..900d576e 100644
--- a/include/ingen/client/PortModel.hpp
+++ b/include/ingen/client/PortModel.hpp
@@ -41,8 +41,6 @@ class PortModel : public ObjectModel, public Ingen::Port
public:
enum Direction { INPUT, OUTPUT };
- const PortTypes& types() const { return _types; }
-
bool supports(const Raul::URI& value_type) const;
inline uint32_t index() const { return _index; }
@@ -53,7 +51,7 @@ public:
bool port_property(const Raul::URI& uri) const;
- bool is_numeric() const { return is_a(PortType::CONTROL); }
+ bool is_numeric() const { return ObjectModel::is_a("http://lv2plug.in/ns/lv2core#ControlPort"); }
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"); }
@@ -90,17 +88,15 @@ private:
friend class ClientStore;
PortModel(Shared::LV2URIMap& uris,
- const Raul::Path& path, uint32_t index, PortType type, Direction dir)
+ const Raul::Path& path,
+ uint32_t index,
+ Direction dir)
: ObjectModel(uris, path)
, _index(index)
, _direction(dir)
, _current_val(0.0f)
, _connections(0)
- {
- _types.insert(type);
- if (type == PortType::UNKNOWN)
- Raul::warn << "[PortModel] Unknown port type" << std::endl;
- }
+ {}
void add_child(SharedPtr<ObjectModel> c) { throw; }
bool remove_child(SharedPtr<ObjectModel> c) { throw; }
@@ -111,7 +107,6 @@ private:
void set(SharedPtr<ObjectModel> model);
uint32_t _index;
- std::set<PortType> _types;
Direction _direction;
Raul::Atom _current_val;
size_t _connections;