- Timestamp:
- 06/09/18 08:21:52 (7 years ago)
- Location:
- cpp/frams/param
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/param.cpp
r796 r805 422 422 } 423 423 424 void SimpleAbstractParam::messageOnExceedRangeExtValue(int i, int setflags, ExtValue& valuetoset) ///< prints a warning when setflags indicates that allowed param range has been exceeded during set 424 template<typename T> void messageOnExceedRange(SimpleAbstractParam *pi, int i, int setflags, T valuetoset) ///< prints a warning when setflags indicates that allowed param range has been exceeded during set 425 { 426 if (setflags & (PSET_HITMIN | PSET_HITMAX)) 427 { 428 ExtValue v(valuetoset); 429 pi->messageOnExceedRange(i, setflags, v); 430 } 431 } 432 433 void SimpleAbstractParam::messageOnExceedRange(int i, int setflags, ExtValue& valuetoset) ///< prints a warning when setflags indicates that allowed param range has been exceeded during set 425 434 { 426 435 if (setflags & (PSET_HITMIN | PSET_HITMAX)) … … 1038 1047 } 1039 1048 } 1040 messageOnExceedRange(i, result, xcopy);1049 ::messageOnExceedRange(this, i, result, xcopy); 1041 1050 return result; 1042 1051 } … … 1072 1081 } 1073 1082 } 1074 messageOnExceedRange(i, result, xcopy);1083 ::messageOnExceedRange(this, i, result, xcopy); 1075 1084 return result; 1076 1085 } … … 1113 1122 } 1114 1123 } 1115 messageOnExceedRange(i, result, xcopy);1124 ::messageOnExceedRange(this, i, result, xcopy); 1116 1125 return result; 1117 1126 } … … 1144 1153 v.setObject(x); 1145 1154 int result = (*(int(*)(void*, const ExtValue*))pe->fun2)(object, &v); 1146 messageOnExceedRange(i, result, xcopy);1155 ::messageOnExceedRange(this, i, result, xcopy); 1147 1156 return result; 1148 1157 } … … 1164 1173 { 1165 1174 int result = (*(int(*)(void*, const ExtValue*))pe->fun2)(object, &x); 1166 messageOnExceedRange(i, result, xcopy);1175 ::messageOnExceedRange(this, i, result, xcopy); 1167 1176 return result; 1168 1177 } -
cpp/frams/param/param.h
r796 r805 291 291 ExtValue getExtValue(int); 292 292 293 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 294 { 295 if (setflags & (PSET_HITMIN | PSET_HITMAX)) 296 { 297 ExtValue v(valuetoset); 298 messageOnExceedRangeExtValue(i, setflags, v); 299 } 300 } 301 void messageOnExceedRangeExtValue(int i, int setflags, ExtValue& valuetoset); ///< used by messageOnExceedRange() internally 302 293 void messageOnExceedRange(int i, int setflags, ExtValue& valuetoset); 303 294 int setInt(int, paInt); 304 295 int setDouble(int, double);
Note: See TracChangeset
for help on using the changeset viewer.