MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / parseBoolean

Method parseBoolean

src/utilities/ntrace/TraceConfiguration.cpp:241–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239#undef UINT_PARAMETER
240
241bool 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
257ULONG TraceCfgReader::parseUInteger(const ConfigFile::Parameter* el) const
258{

Callers

nothing calls this directly

Calls 2

upperMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected