----------------------------------------------------------------------------- Set a new value in the device, selected by item index -----------------------------------------------------------------------------
| 253 | // Set a new value in the device, selected by item index |
| 254 | //----------------------------------------------------------------------------- |
| 255 | bool ValueList::SetByValue |
| 256 | ( |
| 257 | int32 const _value |
| 258 | ) |
| 259 | { |
| 260 | // create a temporary copy of this value to be submitted to the Set() call and set its value to the function param |
| 261 | ValueList* tempValue = new ValueList( *this ); |
| 262 | tempValue->m_valueIdx = _value; |
| 263 | |
| 264 | // Set the value in the device. |
| 265 | bool ret = ((Value*)tempValue)->Set(); |
| 266 | |
| 267 | // clean up the temporary value |
| 268 | delete tempValue; |
| 269 | |
| 270 | return ret; |
| 271 | } |
| 272 | |
| 273 | //----------------------------------------------------------------------------- |
| 274 | // <ValueList::SetByLabel> |