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

Method AddOptionBool

cpp/src/Options.cpp:204–223  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Add a boolean option. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

202// Add a boolean option.
203//-----------------------------------------------------------------------------
204bool Options::AddOptionBool
205(
206 string const& _name,
207 bool const _value
208)
209{
210 // get (or create) option
211 Option* option = AddOption( _name );
212
213 if (option == NULL) return false;
214
215 // set unique option members
216 option->m_type = Options::OptionType_Bool;
217 option->m_valueBool = _value;
218
219 // save in m_options map
220 string lowerName = ToLower( _name );
221 m_options[lowerName] = option;
222 return true;
223}
224
225//-----------------------------------------------------------------------------
226// <Options::AddOptionInt>

Callers 3

CreateMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

ToLowerFunction · 0.85

Tested by

no test coverage detected