summaryrefslogtreecommitdiffstats
path: root/src/PatchagePort.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-22 04:33:15 +0000
committerDavid Robillard <d@drobilla.net>2015-02-22 04:33:15 +0000
commitb8e8ee68c7507bcabb0fb7a5476b83f503be0ca3 (patch)
tree92c4cda22324fa49d0209ecdf93c3e643dbe4276 /src/PatchagePort.hpp
parentd0b8f2a3a5dc1bde35e72f6dffd65b6da861fc6e (diff)
downloadpatchage-b8e8ee68c7507bcabb0fb7a5476b83f503be0ca3.tar.gz
patchage-b8e8ee68c7507bcabb0fb7a5476b83f503be0ca3.tar.bz2
patchage-b8e8ee68c7507bcabb0fb7a5476b83f503be0ca3.zip
Support Jack port order metadata.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5598 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchagePort.hpp')
-rw-r--r--src/PatchagePort.hpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/PatchagePort.hpp b/src/PatchagePort.hpp
index 8bc06fb..d5d6cb3 100644
--- a/src/PatchagePort.hpp
+++ b/src/PatchagePort.hpp
@@ -38,13 +38,14 @@
class PatchagePort : public Ganv::Port
{
public:
- PatchagePort(Ganv::Module& module,
- PortType type,
- const std::string& name,
- const std::string& human_name,
- bool is_input,
- uint32_t color,
- bool show_human_name)
+ PatchagePort(Ganv::Module& module,
+ PortType type,
+ const std::string& name,
+ const std::string& human_name,
+ bool is_input,
+ uint32_t color,
+ bool show_human_name,
+ boost::optional<int> order=boost::optional<int>())
: Port(module,
(show_human_name && !human_name.empty()) ? human_name : name,
is_input,
@@ -52,6 +53,7 @@ public:
, _type(type)
, _name(name)
, _human_name(human_name)
+ , _order(order)
{
signal_event().connect(
sigc::mem_fun(this, &PatchagePort::on_event));
@@ -87,14 +89,16 @@ public:
return true;
}
- PortType type() const { return _type; }
- const std::string& name() const { return _name; }
- const std::string& human_name() const { return _human_name; }
+ PortType type() const { return _type; }
+ const std::string& name() const { return _name; }
+ const std::string& human_name() const { return _human_name; }
+ const boost::optional<int>& order() const { return _order; }
private:
- PortType _type;
- std::string _name;
- std::string _human_name;
+ PortType _type;
+ std::string _name;
+ std::string _human_name;
+ boost::optional<int> _order;
};
#endif // PATCHAGE_PATCHAGEPORT_HPP