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

Method AddOptionInt

cpp/src/Options.cpp:229–248  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Add an integer option. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

227// Add an integer option.
228//-----------------------------------------------------------------------------
229bool Options::AddOptionInt
230(
231 string const& _name,
232 int32 const _value
233)
234{
235 // get (or create) option
236 Option* option = AddOption( _name );
237
238 if (option == NULL) return false;
239
240 // set unique option members
241 option->m_type = Options::OptionType_Int;
242 option->m_valueInt = _value;
243
244 // save in m_options map
245 string lowerName = ToLower( _name );
246 m_options[lowerName] = option;
247 return true;
248}
249
250//-----------------------------------------------------------------------------
251// <Options::AddOptionString>

Callers 3

CreateMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

ToLowerFunction · 0.85

Tested by

no test coverage detected