Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2007, 5:07:46 PM (17 years ago)
Author:
landauf
Message:

added benschs Debug.h from orxonox_v1

include Debug.h or CoreIncludes.h and use it in the following way:
COUT(int) << bla;
PRINT(int)(bla);
PRINTF(int)(bla);

where 'bla' is the same as if you would use the normal std::cout or printf function
and 'int' is a value between 0 and 5:
0 = no debug output
1 = errors
2 = warnings
3 = info
4 = debug
5 = more debug

so to print a warning, use int = 2
for some unimportant debug information, use int = 4
and so on…

the level of the output is configured in the Debug.h file (later i'll add an entry to the config-file for the soft-level).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/core/ClassFactory.h

    r452 r453  
    1010
    1111#include "Identifier.h"
     12#include "Debug.h"
    1213
    1314namespace orxonox
     
    4445        // To create the new branch of the class-hierarchy, we create a new object and delete it afterwards.
    4546        ClassIdentifier<T>::getIdentifier()->startCreatingHierarchy();
    46 #if HIERARCHY_VERBOSE
    47         std::cout << "*** Create Factory -> Create Class\n";
    48 #endif
     47        COUT(4) << "*** Create Factory -> Create Class\n";
    4948        BaseObject* temp = ClassIdentifier<T>::getIdentifier()->fabricate();
    5049        delete temp;
Note: See TracChangeset for help on using the changeset viewer.