set and save value
| 136 | |
| 137 | // set and save value |
| 138 | bool Parameter::set_and_save(float value) |
| 139 | { |
| 140 | if (vp == nullptr) { |
| 141 | return false; |
| 142 | } |
| 143 | switch (vtype) { |
| 144 | case AP_PARAM_INT8: |
| 145 | ((AP_Int8 *)vp)->set_and_save(value); |
| 146 | return true; |
| 147 | case AP_PARAM_INT16: |
| 148 | ((AP_Int16 *)vp)->set_and_save(value); |
| 149 | return true; |
| 150 | case AP_PARAM_INT32: |
| 151 | ((AP_Int32 *)vp)->set_and_save(value); |
| 152 | return true; |
| 153 | case AP_PARAM_FLOAT: |
| 154 | ((AP_Float *)vp)->set_and_save(value); |
| 155 | return true; |
| 156 | default: |
| 157 | break; |
| 158 | } |
| 159 | // not a supported type |
| 160 | return false; |
| 161 | } |
| 162 | |
| 163 | // Check if param had been configured |
| 164 | bool Parameter::configured() |
no outgoing calls
no test coverage detected