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

Method Create

cpp/src/Manager.cpp:82–102  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Static creation of the singleton -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

80// Static creation of the singleton
81//-----------------------------------------------------------------------------
82Manager* Manager::Create
83(
84)
85{
86
87
88 if( Options::Get() && Options::Get()->AreLocked() )
89 {
90 if( NULL == s_instance )
91 {
92 s_instance = new Manager();
93 }
94 return s_instance;
95 }
96
97 // Options have not been created and locked.
98 Log::Create( "", false, true, LogLevel_Debug, LogLevel_Debug, LogLevel_None );
99 Log::Write( LogLevel_Error, "Options have not been created and locked. Exiting..." );
100 OZW_FATAL_ERROR(OZWException::OZWEXCEPTION_OPTIONS, "Options Not Created and Locked");
101 return NULL;
102}
103
104//-----------------------------------------------------------------------------
105// <Manager::Destroy>

Callers

nothing calls this directly

Calls 2

WriteFunction · 0.85
GetFunction · 0.70

Tested by

no test coverage detected