Changeset 93 for cpp/gdk/param.h
- Timestamp:
- 07/02/13 22:37:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/gdk/param.h
r81 r93 11 11 #include "statrick.h" 12 12 #include "virtfile.h" 13 #include "framsg.h" 13 14 14 15 class ExtValue; … … 118 119 int setStringById(const char* prop,const SString &);///< set string value, you can only use this for "s" type prop 119 120 int setObjectById(const char* prop,const ExtObject &);///< set object reference, you can only use this for "o" type prop 120 121 int set ExtValueById(const char* prop,const ExtValue &); ///< 4 in 1121 int setExtValueById(const char* prop,const ExtValue &); ///< for ExtValue types only 122 int setById(const char* prop,const ExtValue &);///< can be used for all property types 122 123 123 124 /** get valid minimum, maximum and default value for property 'prop' … … 239 240 ExtValue getExtValue(int); 240 241 242 template<typename T> void messageOnExceedRange(int i,int setflags, T valuetoset) ///< prints a warning when setflags indicates that allowed param range has been exceeded during set 243 { 244 if (setflags & (PSET_HITMIN | PSET_HITMAX)) 245 { 246 SString svaluetoset=SString::valueOf(valuetoset); //converts any type to SString 247 SString actual=get(i); 248 FMprintf("Param","set",FMLV_WARN,"Setting '%s.%s = %s' exceeded allowed range (too %s). Adjusted to %s.", 249 getName(),id(i),(const char*)svaluetoset,(setflags&PSET_HITMAX)?"big":"small",(const char*)actual); 250 } 251 } 252 241 253 int setInt(int,long); 242 254 int setDouble(int,double);
Note: See TracChangeset
for help on using the changeset viewer.