+ bool initOk;
+
+ template<class T>
+ static void updateValue(_serial_prot& prot, const T& val)
+ {
+ T new_val = (prot.rel ? getValue<T>(prot.prop) : 0)
+ + prot.offset
+ + prot.factor * val;
+
+ if( prot.max > prot.min )
+ {
+ if( prot.wrap )
+ new_val = SGMisc<double>::normalizePeriodic(prot.min, prot.max, new_val);
+ else
+ new_val = SGMisc<T>::clip(new_val, prot.min, prot.max);
+ }
+
+ setValue(prot.prop, new_val);
+ }
+
+ // Special handling for bool (relative change = toggle, no min/max, no wrap)
+ static void updateValue(_serial_prot& prot, bool val);