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

Method AddOption

cpp/src/Options.cpp:549–568  ·  view source on GitHub ↗

----------------------------------------------------------------------------- General setup for adding a specific option -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

547// General setup for adding a specific option
548//-----------------------------------------------------------------------------
549Options::Option* Options::AddOption
550(
551 string const& _name
552)
553{
554 if( m_locked )
555 {
556 Log::Write( LogLevel_Error, "Options have been locked. No more may be added." );
557 return NULL;
558 }
559
560 // get a pointer to the option (and create a new Option if it doesn't already exist)
561 Option* option = Find( _name );
562 if( option == NULL )
563 {
564 option = new Option( _name );
565 }
566
567 return option;
568}
569
570//-----------------------------------------------------------------------------
571// <Options::Find>

Callers

nothing calls this directly

Calls 1

WriteFunction · 0.85

Tested by

no test coverage detected