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 m_linked;
19 }
20
26 void SetAsLinked(bool value = true) {
27 m_linked = value;
28 }
29
35 string GetName() const {
36 return m_name;
37 }
38
44 void SetName(const string& name) {
45 m_name = name;
46 }
47
53 float GetValue() const {
54 return m_value;
55 }
56
62 float* GetValuePointer() {
63 return &m_value;
64 }
65
71 void SetValue(float val) {
72 m_value = val;
73 }
74
75 protected:
76 bool m_linked;
77 string m_name;
78 float m_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