diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-10 08:52:33 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-05-10 08:52:55 +0100 |
commit | bcbdd858faff38b9b22573284f07bdb35b76140b (patch) | |
tree | de0f3d0ab6b3ffdc4bc88d651de132ac608ed5ee /libs/ardour/ardour/automatable.h | |
parent | 86149840a1a3950a86dec2a8c0daa974e23e54c2 (diff) |
Selection::get_stripables() needs to recurse into an Automatable's child Automatables when looking for for an Automation Control
It also needs renaming (to come)
Diffstat (limited to 'libs/ardour/ardour/automatable.h')
-rw-r--r-- | libs/ardour/ardour/automatable.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libs/ardour/ardour/automatable.h b/libs/ardour/ardour/automatable.h index cde527bed6..4e7c11d51c 100644 --- a/libs/ardour/ardour/automatable.h +++ b/libs/ardour/ardour/automatable.h @@ -55,10 +55,27 @@ public: boost::shared_ptr<Evoral::Control> control_factory(const Evoral::Parameter& id); boost::shared_ptr<AutomationControl> automation_control (PBD::ID const & id) const; + /* derived classes need to provide some way to search their own child + automatable's for a control. normally, we'd just make the method + above virtual, and let them override it. But that wouldn't + differentiate the "check children" and "just your own" cases. + + We could theoretically just overload the above method with an extra + "bool recurse = default", but the rules of name hiding for C++ mean + that making a method virtual will hide other overloaded versions of + the same name. This means that virtual automation_control (PBD::ID + const &) would hide automation_control (Evoral::Parameter const & + id). + + So, skip around all that with a different name. + */ + virtual boost::shared_ptr<AutomationControl> automation_control_recurse (PBD::ID const & id) const { + return automation_control (id); + } + boost::shared_ptr<AutomationControl> automation_control (const Evoral::Parameter& id) { return automation_control (id, false); } - boost::shared_ptr<AutomationControl> automation_control (const Evoral::Parameter& id, bool create_if_missing); boost::shared_ptr<const AutomationControl> automation_control (const Evoral::Parameter& id) const; |