get value
| 107 | |
| 108 | // get value |
| 109 | bool Parameter::get(float &value) |
| 110 | { |
| 111 | if (vp == nullptr) { |
| 112 | return false; |
| 113 | } |
| 114 | switch (vtype) { |
| 115 | case AP_PARAM_INT8: |
| 116 | value = ((AP_Int8 *)vp)->get(); |
| 117 | break; |
| 118 | case AP_PARAM_INT16: |
| 119 | value = ((AP_Int16 *)vp)->get(); |
| 120 | break; |
| 121 | |
| 122 | case AP_PARAM_INT32: |
| 123 | value = ((AP_Int32 *)vp)->get(); |
| 124 | break; |
| 125 | |
| 126 | case AP_PARAM_FLOAT: |
| 127 | value = ((AP_Float *)vp)->get(); |
| 128 | break; |
| 129 | |
| 130 | default: |
| 131 | // not a supported type |
| 132 | return false; |
| 133 | } |
| 134 | return true; |
| 135 | } |
| 136 | |
| 137 | // set and save value |
| 138 | bool Parameter::set_and_save(float value) |
no outgoing calls
no test coverage detected