MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / GetOptionAsInt

Method GetOptionAsInt

cpp/src/Options.cpp:302–317  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Get the value of an integer option. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

300// Get the value of an integer option.
301//-----------------------------------------------------------------------------
302bool Options::GetOptionAsInt
303(
304 string const& _name,
305 int32* o_value
306)
307{
308 Option* option = Find( _name );
309 if( o_value && option && ( OptionType_Int == option->m_type ) )
310 {
311 *o_value = option->m_valueInt;
312 return true;
313 }
314
315 Log::Write( LogLevel_Warning, "Specified option [%s] was not found.", _name.c_str() );
316 return false;
317}
318
319//-----------------------------------------------------------------------------
320// <Options::GetOptionAsString>

Callers 4

ManagerMethod · 0.80
DriverMethod · 0.80
DriverThreadProcMethod · 0.80
ThreadImplMethod · 0.80

Calls 2

WriteFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected