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

Method AddOptionString

cpp/src/Options.cpp:254–275  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Add a string option. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

252// Add a string option.
253//-----------------------------------------------------------------------------
254bool Options::AddOptionString
255(
256 string const& _name,
257 string const& _value,
258 bool const _append
259)
260{
261 // get (or create) option
262 Option* option = AddOption( _name );
263
264 if (option == NULL) return false;
265
266 // set unique option members
267 option->m_type = Options::OptionType_String;
268 option->m_valueString = _value;
269 option->m_append = _append;
270
271 // save in m_options map
272 string lowerName = ToLower( _name );
273 m_options[lowerName] = option;
274 return true;
275}
276
277//-----------------------------------------------------------------------------
278// <Options::GetOptionAsBool>

Callers 1

CreateMethod · 0.80

Calls 1

ToLowerFunction · 0.85

Tested by

no test coverage detected