parameterlink.h (570B)
1 #pragma once 2 3 #include <set> 4 5 #include "parameterlistener.h" 6 7 namespace pluginLib 8 { 9 class Parameter; 10 11 class ParameterLink 12 { 13 public: 14 ParameterLink(Parameter* _source, Parameter* _dest, bool _applyCurrentSourceToTarget); 15 ~ParameterLink(); 16 17 bool add(Parameter* _target, bool _applyCurrentSourceToTarget); 18 bool remove(Parameter* _target); 19 20 bool empty() const { return m_targets.empty(); } 21 22 private: 23 void onSourceValueChanged(); 24 25 Parameter* const m_source; 26 ParameterListener m_sourceListener; 27 std::set<Parameter*> m_targets; 28 int m_sourceValue; 29 }; 30 }