summaryrefslogtreecommitdiffstats
path: root/ingen/client/PortModel.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-11 04:47:21 +0000
committerDavid Robillard <d@drobilla.net>2013-01-11 04:47:21 +0000
commit10e9a3a800a35916872abf9e354be4c554338e4e (patch)
treed6be3ce7993f5d8efd525629fd321b32a6341633 /ingen/client/PortModel.hpp
parent684eaf6b58e41f6758b160b882a6313faf0cff18 (diff)
downloadingen-10e9a3a800a35916872abf9e354be4c554338e4e.tar.gz
ingen-10e9a3a800a35916872abf9e354be4c554338e4e.tar.bz2
ingen-10e9a3a800a35916872abf9e354be4c554338e4e.zip
Use type safe enumerations.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4918 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ingen/client/PortModel.hpp')
-rw-r--r--ingen/client/PortModel.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ingen/client/PortModel.hpp b/ingen/client/PortModel.hpp
index 41b871ab..92379e6e 100644
--- a/ingen/client/PortModel.hpp
+++ b/ingen/client/PortModel.hpp
@@ -39,17 +39,17 @@ namespace Client {
class PortModel : public ObjectModel
{
public:
- enum Direction { INPUT, OUTPUT };
+ enum class Direction { INPUT, OUTPUT };
- GraphType graph_type() const { return Node::PORT; }
+ GraphType graph_type() const { return Node::GraphType::PORT; }
bool supports(const Raul::URI& value_type) const;
inline uint32_t index() const { return _index; }
inline const Raul::Atom& value() const { return get_property(_uris.ingen_value); }
inline bool connected() const { return (_connections > 0); }
- inline bool is_input() const { return (_direction == INPUT); }
- inline bool is_output() const { return (_direction == OUTPUT); }
+ inline bool is_input() const { return (_direction == Direction::INPUT); }
+ inline bool is_output() const { return (_direction == Direction::OUTPUT); }
bool port_property(const Raul::URI& uri) const;