Changeset 1792 for code/trunk/src/core/Shell.cc
- Timestamp:
- Sep 16, 2008, 8:45:13 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/Shell.cc
r1755 r1792 50 50 SetConsoleCommandShortcut(OutputHandler, debug); 51 51 52 Shell* Shell::singletonRef_s = 0; 53 52 54 Shell::Shell() 53 55 { 56 assert(singletonRef_s == 0); 57 singletonRef_s = this; 58 59 int level = Core::getSoftDebugLevel(OutputHandler::LD_Shell); 60 Core::setSoftDebugLevel(OutputHandler::LD_Shell, -1); 61 54 62 RegisterRootObject(Shell); 55 63 … … 70 78 71 79 this->setConfigValues(); 80 81 Core::setSoftDebugLevel(OutputHandler::LD_Shell, level); 72 82 } 73 83 … … 76 86 if (this->inputBuffer_) 77 87 delete this->inputBuffer_; 78 } 79 80 Shell& Shell::createShell() 81 { 82 int level = Core::getSoftDebugLevel(OutputHandler::LD_Shell); 83 Core::setSoftDebugLevel(OutputHandler::LD_Shell, -1); 84 static Shell instance; 85 Core::setSoftDebugLevel(OutputHandler::LD_Shell, level); 86 return instance; 87 } 88 89 Shell& Shell::getInstance() 90 { 91 static Shell& instance = createShell(); 92 return instance; 88 singletonRef_s = 0; 93 89 } 94 90
Note: See TracChangeset
for help on using the changeset viewer.