hydrobricks
Loading...
Searching...
No Matches
Parameter.h
1#ifndef HYDROBRICKS_PARAMETER_H
2#define HYDROBRICKS_PARAMETER_H
3
4#include "Includes.h"
5
6class Parameter : public wxObject {
7 public:
8 explicit Parameter(const string& name, float val = NAN_F);
9
10 ~Parameter() override = default;
11
17 bool IsLinked() const {
18 return _linked;
19 }
20
26 void SetAsLinked(bool value = true) {
27 _linked = value;
28 }
29
35 string GetName() const {
36 return _name;
37 }
38
44 void SetName(const string& name) {
45 _name = name;
46 }
47
53 float GetValue() const {
54 return _value;
55 }
56
62 float* GetValuePointer() {
63 return &_value;
64 }
65
71 void SetValue(float val) {
72 _value = val;
73 }
74
75 protected:
76 bool _linked;
77 string _name;
78 float _value;
79};
80
81#endif // HYDROBRICKS_PARAMETER_H
Definition Parameter.h:6
float * GetValuePointer()
Definition Parameter.h:62
void SetName(const string &name)
Definition Parameter.h:44
string GetName() const
Definition Parameter.h:35
bool IsLinked() const
Definition Parameter.h:17
void SetAsLinked(bool value=true)
Definition Parameter.h:26
float GetValue() const
Definition Parameter.h:53
void SetValue(float val)
Definition Parameter.h:71