| 239 | #undef UINT_PARAMETER |
| 240 | |
| 241 | bool TraceCfgReader::parseBoolean(const ConfigFile::Parameter* el) const |
| 242 | { |
| 243 | ConfigFile::String tempValue(el->value); |
| 244 | tempValue.upper(); |
| 245 | |
| 246 | if (tempValue == "1" || tempValue == "ON" || tempValue == "YES" || tempValue == "TRUE") |
| 247 | return true; |
| 248 | if (tempValue == "0" || tempValue == "OFF" || tempValue == "NO" || tempValue == "FALSE") |
| 249 | return false; |
| 250 | |
| 251 | fatal_exception::raiseFmt(ERROR_PREFIX |
| 252 | "line %d, element \"%s\": \"%s\" is not a valid boolean value", |
| 253 | el->line, el->name.c_str(), el->value.c_str()); |
| 254 | return false; // Silence the compiler |
| 255 | } |
| 256 | |
| 257 | ULONG TraceCfgReader::parseUInteger(const ConfigFile::Parameter* el) const |
| 258 | { |