From b8e8ee68c7507bcabb0fb7a5476b83f503be0ca3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 22 Feb 2015 04:33:15 +0000 Subject: Support Jack port order metadata. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5598 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchagePort.hpp | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'src/PatchagePort.hpp') 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 order=boost::optional()) : 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& 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 _order; }; #endif // PATCHAGE_PATCHAGEPORT_HPP -- cgit v1.2.1