----------------------------------------------------------------------------- Static creation of the singleton -----------------------------------------------------------------------------
| 80 | // Static creation of the singleton |
| 81 | //----------------------------------------------------------------------------- |
| 82 | Manager* 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> |