Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/core/DebugLevel.cc @ 618

Last change on this file since 618 was 562, checked in by landauf, 17 years ago

modified DebugLevel-hack

File size: 777 bytes
Line 
1#include "CoreIncludes.h"
2#include "DebugLevel.h"
3#include "Debug.h"
4
5namespace orxonox
6{
7    DebugLevel* DebugLevel::pointer_s = 0;
8    bool DebugLevel::bCreatingDebugLevelObject_s = false;
9
10    DebugLevel::DebugLevel()
11    {
12        RegisterRootObject(DebugLevel);
13        SetConfigValue(softDebugLevel_s, 2);
14    }
15
16    int DebugLevel::getSoftDebugLevel()
17    {
18        if (!pointer_s && !bCreatingDebugLevelObject_s)
19        {
20            bCreatingDebugLevelObject_s = true;
21            pointer_s = new DebugLevel;
22            bCreatingDebugLevelObject_s = false;
23        }
24
25        if (bCreatingDebugLevelObject_s)
26            return 4;
27
28        return pointer_s->softDebugLevel_s;
29    }
30}
31
32int getSoftDebugLevel()
33{
34    return orxonox::DebugLevel::getSoftDebugLevel();
35}
Note: See TracBrowser for help on using the repository browser.