set a value
| 81 | |
| 82 | // set a value |
| 83 | bool Parameter::set(float value) |
| 84 | { |
| 85 | if (vp == nullptr) { |
| 86 | return false; |
| 87 | } |
| 88 | switch (vtype) { |
| 89 | case AP_PARAM_INT8: |
| 90 | ((AP_Int8 *)vp)->set(value); |
| 91 | return true; |
| 92 | case AP_PARAM_INT16: |
| 93 | ((AP_Int16 *)vp)->set(value); |
| 94 | return true; |
| 95 | case AP_PARAM_INT32: |
| 96 | ((AP_Int32 *)vp)->set(value); |
| 97 | return true; |
| 98 | case AP_PARAM_FLOAT: |
| 99 | ((AP_Float *)vp)->set(value); |
| 100 | return true; |
| 101 | default: |
| 102 | break; |
| 103 | } |
| 104 | // not a supported type |
| 105 | return false; |
| 106 | } |
| 107 | |
| 108 | // get value |
| 109 | bool Parameter::get(float &value) |
no outgoing calls
no test coverage detected