1 #ifndef PARAMCONTROLLER_HPP
2 #define PARAMCONTROLLER_HPP
40 static std::shared_ptr<ParamController>
Create(std::shared_ptr<Module> m,
const std::shared_ptr<ParamTemplate>
templ);
41 void Set(
float value);
44 inline float Get()
const {
return current_val;}
70 const std::shared_ptr<ParamTemplate>
templ;
72 ParamController(std::shared_ptr<Module> m,
const std::shared_ptr<ParamTemplate> t);
73 float current_val = 0.0;
74 float range_min = 0.0, range_max = 1.0;
75 std::weak_ptr<Module> module;
87 void Got(
float v){ controller->Set(v); }
88 static std::shared_ptr<SendReplyController>
Create(std::shared_ptr<Module> m, std::string
id, std::shared_ptr<ParamController> ctrl);
91 SendReplyController(std::shared_ptr<Module> m, std::string
id, std::shared_ptr<ParamController> ctrl);
92 int sendreply_id, module_id;
93 std::shared_ptr<ParamController> controller;
94 std::weak_ptr<Module> module;
100 #endif // PARAMCONTROLLER_HPP
Signal< float, float > on_set
Definition: ParamController.hpp:63
static std::shared_ptr< ParamController > Create(std::shared_ptr< Module > m, const std::shared_ptr< ParamTemplate > templ)
float GetRelative() const
void SetRelative(float value)
float Get() const
Definition: ParamController.hpp:44
float GetRangeMin() const
Definition: ParamController.hpp:56
const std::shared_ptr< ParamTemplate > templ
Definition: ParamController.hpp:70
void SetRangeMax(float v)
Definition: ParamController.hpp:51
bool Happen(Types...t)
Definition: Signal.hpp:187
void Got(float v)
Definition: ParamController.hpp:87
Definition: Alertable.hpp:26
Definition: ParamController.hpp:84
Signal< float > on_range_max_set
Definition: ParamController.hpp:68
Definition: ParamController.hpp:37
std::string id
Definition: ParamController.hpp:39
Signal< float > on_range_min_set
Definition: ParamController.hpp:67
float GetRangeMax() const
Definition: ParamController.hpp:57
static std::shared_ptr< SendReplyController > Create(std::shared_ptr< Module > m, std::string id, std::shared_ptr< ParamController > ctrl)
void SetRangeMin(float v)
Definition: ParamController.hpp:46
Signal< float, float > after_set
Definition: ParamController.hpp:65
std::string id
Definition: ParamController.hpp:86