summaryrefslogtreecommitdiffstats
path: root/src/common/interface/Port.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-25 20:40:13 +0000
committerDavid Robillard <d@drobilla.net>2010-02-25 20:40:13 +0000
commit77a9beca75debd2d87d735fc4fe847694eee6f13 (patch)
treeae03699b999e84bc4c283abfd215c8037ecddaf6 /src/common/interface/Port.hpp
parente22984efe9b82ab006494aea93814a592cd44ece (diff)
downloadingen-77a9beca75debd2d87d735fc4fe847694eee6f13.tar.gz
ingen-77a9beca75debd2d87d735fc4fe847694eee6f13.tar.bz2
ingen-77a9beca75debd2d87d735fc4fe847694eee6f13.zip
Work on contexts and polymorphic ports.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2492 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/common/interface/Port.hpp')
-rw-r--r--src/common/interface/Port.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/common/interface/Port.hpp b/src/common/interface/Port.hpp
index c7029095..06272b6f 100644
--- a/src/common/interface/Port.hpp
+++ b/src/common/interface/Port.hpp
@@ -18,6 +18,7 @@
#ifndef INGEN_INTERFACE_PORT_HPP
#define INGEN_INTERFACE_PORT_HPP
+#include <set>
#include <stdint.h>
#include "GraphObject.hpp"
#include "PortType.hpp"
@@ -37,9 +38,16 @@ namespace Shared {
class Port : public virtual GraphObject
{
public:
+ typedef std::set<Shared::PortType> PortTypes;
+
+ virtual const PortTypes& types() const = 0;
+
+ inline bool is_a(PortType type) const { return types().find(type) != types().end(); }
+
+ virtual bool supports(const Raul::URI& value_type) const = 0;
+
virtual uint32_t index() const = 0;
virtual bool is_input() const = 0;
- virtual Shared::PortType type() const = 0;
virtual const Raul::Atom& value() const = 0;
};