Changeset 686
- Timestamp:
- Dec 26, 2007, 7:22:06 PM (17 years ago)
- Location:
- code/branches/FICN
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/DebugLevel.cc
r684 r686 37 37 namespace orxonox 38 38 { 39 DebugLevel* DebugLevel::pointer_s = 0; // Set the static member variable pointer_s to zero40 bool DebugLevel::bCreatingDebugLevelObject_s = false; // Set the static member variable bCreatingDebugLevelObject_s to false41 42 39 /** 43 40 @brief Constructor: Registers the object and sets the debug level. … … 45 42 DebugLevel::DebugLevel() 46 43 { 44 this->softDebugLevel_ = 4; // accounts for the recursive call when creating the object 47 45 RegisterRootObject(DebugLevel); 48 SetConfigValue(softDebugLevel_ s, 2);46 SetConfigValue(softDebugLevel_, 2); 49 47 } 50 48 … … 54 52 int DebugLevel::getSoftDebugLevel() 55 53 { 56 if (!pointer_s && !bCreatingDebugLevelObject_s) 57 { 58 // We need the bCreatingDebugLevelObject_s variable to avoid an infinite recursion: 59 // Creating the object produces debug output and debug output needs the object. 60 bCreatingDebugLevelObject_s = true; 61 pointer_s = new DebugLevel; 62 bCreatingDebugLevelObject_s = false; 63 } 64 else if (bCreatingDebugLevelObject_s) 65 return 4; 66 67 return pointer_s->softDebugLevel_s; 54 static DebugLevel theOneAndOnlyInstance = DebugLevel(); 55 return theOneAndOnlyInstance.softDebugLevel_; 68 56 } 69 57 } -
code/branches/FICN/src/orxonox/core/DebugLevel.h
r684 r686 54 54 ~DebugLevel() {} // don't delete 55 55 56 int softDebugLevel_s; //!< The output level 57 static DebugLevel* pointer_s; //!< A pointer to the only existing instance of this class 58 static bool bCreatingDebugLevelObject_s; //!< True if the only instance is being created (this is needed to avoid recurstion - creating the object produces debug output, debug output needs the object) 56 int softDebugLevel_; //!< The output level 59 57 }; 60 58 } -
code/branches/FICN/visual_studio/base_properties.vsprops
r678 r686 11 11 AdditionalIncludeDirectories=""$(SolutionDir)\..\src";"$(OGRE_HOME)\Dependencies\include";"$(OGRE_HOME)\OgreMain\include";"$(ORXONOX_HOME)\dependencies\include"" 12 12 PreprocessorDefinitions="WIN32;__WIN32__;_WIN32;BOOST_ALL_DYN_LINK" 13 WarningLevel=" 3"13 WarningLevel="2" 14 14 Detect64BitPortabilityProblems="true" 15 15 DebugInformationFormat="3" -
code/branches/FICN/visual_studio/core.vcproj
r682 r686 191 191 </File> 192 192 <File 193 RelativePath="..\src\orxonox\core\OutputHandler.cc" 194 > 195 </File> 196 <File 193 197 RelativePath="..\src\orxonox\core\SignalHandler.cc" 194 198 > … … 261 265 </File> 262 266 <File 267 RelativePath="..\src\orxonox\core\OutputHandler.h" 268 > 269 </File> 270 <File 263 271 RelativePath="..\src\orxonox\core\SignalHandler.h" 264 272 >
Note: See TracChangeset
for help on using the changeset viewer.