- Timestamp:
- May 19, 2008, 4:37:06 PM (17 years ago)
- Location:
- code/branches/console/src/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/CoreSettings.cc
r1058 r1326 117 117 118 118 /** 119 @brief Static function that holds the singleton. 119 @brief Returns the softDebugLevel for the given device (returns a default-value if the class ist right about to be created). 120 @param device The device 121 @return The softDebugLevel 120 122 */ 121 123 int CoreSettings::getSoftDebugLevel(OutputHandler::OutputDevice device) … … 136 138 return 2; 137 139 } 140 141 /** 142 @brief Sets the softDebugLevel for the given device. Please use this only temporary and restore the value afterwards, as it overrides the configured value. 143 @param device The device 144 @param level The level 145 */ 146 void CoreSettings::setSoftDebugLevel(OutputHandler::OutputDevice device, int level) 147 { 148 if (!CoreSettings::isCreatingCoreSettings()) 149 { 150 if (device == OutputHandler::LD_All) 151 CoreSettings::getInstance().softDebugLevel_ = level; 152 else if (device == OutputHandler::LD_Console) 153 CoreSettings::getInstance().softDebugLevelConsole_ = level; 154 else if (device == OutputHandler::LD_Logfile) 155 CoreSettings::getInstance().softDebugLevelLogfile_ = level; 156 else if (device == OutputHandler::LD_Shell) 157 CoreSettings::getInstance().softDebugLevelShell_ = level; 158 } 159 } 138 160 139 161 /** -
code/branches/console/src/core/CoreSettings.h
r1064 r1326 54 54 55 55 static int getSoftDebugLevel(OutputHandler::OutputDevice device = OutputHandler::LD_All); 56 static void setSoftDebugLevel(OutputHandler::OutputDevice device, int level); 56 57 static const std::string& getLanguage(); 57 58 static void resetLanguage(); -
code/branches/console/src/core/Shell.cc
r1325 r1326 31 31 #include "CoreIncludes.h" 32 32 #include "ConfigValueIncludes.h" 33 #include "CoreSettings.h" 33 34 34 35 #define SHELL_UPDATE_LISTENERS(function) \ … … 70 71 } 71 72 73 Shell& Shell::createShell() 74 { 75 int level = CoreSettings::getSoftDebugLevel(OutputHandler::LD_Shell); 76 CoreSettings::setSoftDebugLevel(OutputHandler::LD_Shell, -1); 77 static Shell instance; 78 CoreSettings::setSoftDebugLevel(OutputHandler::LD_Shell, level); 79 return instance; 80 } 81 72 82 Shell& Shell::getInstance() 73 83 { 74 static Shell instance;84 static Shell& instance = createShell(); 75 85 return instance; 76 86 } … … 325 335 326 336 this->clear(); 337 this->scrollPosition_ = 0; 338 this->scrollIterator_ = this->lines_.begin(); 339 327 340 SHELL_UPDATE_LISTENERS(exit); 328 341 } -
code/branches/console/src/core/Shell.h
r1322 r1326 57 57 public: 58 58 static Shell& getInstance(); 59 static Shell& createShell(); 59 60 60 61 virtual void setConfigValues();
Note: See TracChangeset
for help on using the changeset viewer.