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/Iterator.h

    r452 r453  
    1818#ifndef _Iterator_H__
    1919#define _Iterator_H__
     20
     21#include "Debug.h"
    2022
    2123namespace orxonox
     
    100102                // Comparing with anything except zero makes no sense
    101103                if (compare != 0)
    102                     std::cout << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works.\n";
     104                    COUT(2) << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works.\n";
    103105
    104106                return (this->element_ != 0);
Note: See TracChangeset for help on using the changeset viewer.