Changeset 796 for cpp/frams/param/param.h
- Timestamp:
- 06/06/18 00:45:50 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/param.h
r786 r796 252 252 }; 253 253 254 template<typename T> struct quote_in_messages { constexpr static const char* value = "'"; };255 template<> struct quote_in_messages < SString > { constexpr static const char* value = "\""; };256 template<typename T> struct length_in_messages { static const bool value = false; };257 template<> struct length_in_messages < SString > { static const bool value = true; };258 259 254 class SimpleAbstractParam : public virtual ParamInterface 260 255 { … … 300 295 if (setflags & (PSET_HITMIN | PSET_HITMAX)) 301 296 { 302 SString svaluetoset = SString::valueOf(valuetoset); //converts any type to SString 303 SString actual = get(i); 304 bool s_type = type(i)[0] == 's'; 305 logPrintf("Param", "set", LOG_WARN, "Setting %s.%s = %s exceeded allowed range (too %s). %s to %s.", 306 getName(), id(i), 307 ::sstringDelimitAndShorten(svaluetoset, 30, length_in_messages<T>::value, quote_in_messages<T>::value, quote_in_messages<T>::value).c_str(), 308 (setflags&PSET_HITMAX) ? (s_type ? "long" : "big") : "small", s_type ? "Truncated" : "Adjusted", 309 ::sstringDelimitAndShorten(actual, 30, length_in_messages<T>::value, quote_in_messages<T>::value, quote_in_messages<T>::value).c_str() 310 ); 297 ExtValue v(valuetoset); 298 messageOnExceedRangeExtValue(i, setflags, v); 311 299 } 312 300 } 301 void messageOnExceedRangeExtValue(int i, int setflags, ExtValue& valuetoset); ///< used by messageOnExceedRange() internally 313 302 314 303 int setInt(int, paInt);
Note: See TracChangeset
for help on using the changeset viewer.