Changeset 1302 for cpp/frams/param
- Timestamp:
- 04/25/24 21:59:54 (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/param.cpp
r1278 r1302 104 104 } 105 105 106 int ParamInterface::getMinMaxInt(int prop, paInt& min umum, paInt& maximum, paInt &def)107 { 108 return getMinMaxIntFromTypeDef(type(prop), min umum, maximum, def);109 } 110 111 int ParamInterface::getMinMaxDouble(int prop, double& min umum, double& maximum, double& def)112 { 113 return getMinMaxDoubleFromTypeDef(type(prop), min umum, maximum, def);114 } 115 116 int ParamInterface::getMinMaxString(int prop, int& min umum, int& maximum, SString& def)117 { 118 return getMinMaxStringFromTypeDef(type(prop), min umum, maximum, def);119 } 120 121 int ParamInterface::getMinMaxIntFromTypeDef(const char* t, paInt& min umum, paInt& maximum, paInt &def)106 int ParamInterface::getMinMaxInt(int prop, paInt& minimum, paInt& maximum, paInt &def) 107 { 108 return getMinMaxIntFromTypeDef(type(prop), minimum, maximum, def); 109 } 110 111 int ParamInterface::getMinMaxDouble(int prop, double& minimum, double& maximum, double& def) 112 { 113 return getMinMaxDoubleFromTypeDef(type(prop), minimum, maximum, def); 114 } 115 116 int ParamInterface::getMinMaxString(int prop, int& minimum, int& maximum, SString& def) 117 { 118 return getMinMaxStringFromTypeDef(type(prop), minimum, maximum, def); 119 } 120 121 int ParamInterface::getMinMaxIntFromTypeDef(const char* t, paInt& minimum, paInt& maximum, paInt &def) 122 122 { 123 123 while (*t) if (*t == ' ') break; else t++; 124 return sscanf(t, PA_INT_SCANF " " PA_INT_SCANF " " PA_INT_SCANF, &min umum, &maximum, &def);125 } 126 127 int ParamInterface::getMinMaxDoubleFromTypeDef(const char* t, double& min umum, double& maximum, double& def)124 return sscanf(t, PA_INT_SCANF " " PA_INT_SCANF " " PA_INT_SCANF, &minimum, &maximum, &def); 125 } 126 127 int ParamInterface::getMinMaxDoubleFromTypeDef(const char* t, double& minimum, double& maximum, double& def) 128 128 { 129 129 while (*t) if (*t == ' ') break; else t++; 130 return sscanf(t, "%l g %lg %lg", &minumum, &maximum, &def);131 } 132 133 int ParamInterface::getMinMaxStringFromTypeDef(const char* t, int& min umum, int& maximum, SString& def)130 return sscanf(t, "%lf %lf %lf", &minimum, &maximum, &def); 131 } 132 133 int ParamInterface::getMinMaxStringFromTypeDef(const char* t, int& minimum, int& maximum, SString& def) 134 134 { 135 135 while (*t) if (*t == ' ') break; else t++; 136 int ret = sscanf(t, "%d %d", &min umum, &maximum);136 int ret = sscanf(t, "%d %d", &minimum, &maximum); 137 137 def = SString::empty(); 138 138 if (ret == 2)
Note: See TracChangeset
for help on using the changeset viewer.