Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4373 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
May 29, 2005, 10:50:14 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: better definition of debug.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/defs/debug.h

    r4354 r4373  
    3535#define WARN            2
    3636#define INFO            3
    37 #define DEBUGING        4
    38 #define vDEBUGING       5
     37#define DEBUG           4
     38#define vDEBUG          5
    3939
    4040extern int verbose;
     
    8282#endif /* DEBUG_SPECIAL_MODULE */
    8383#endif /* MODULAR_DEBUG */
     84
    8485///////////////////////////////////////////////////
    8586/// PRINTF: prints with filename and linenumber ///
    8687///////////////////////////////////////////////////
     88#define PRINTFNO      PRINTF0
     89#define PRINTFERR     PRINTF1
     90#define PRINTFWARN    PRINTF2
     91#define PRINTFINFO    PRINTF3
     92#define PRINTFDEBUG   PRINTF4
     93#define PRINTFVDEBUG  PRINTF5
    8794
    8895#ifdef DEBUG
     
    116123#endif
    117124     
    118 #if HARD_DEBUG_LEVEL >= DEBUGING
     125#if HARD_DEBUG_LEVEL >= DEBUG
    119126#define PRINTF4 \
    120      if (SOFT_DEBUG_LEVEL >= DEBUGING) \
     127     if (SOFT_DEBUG_LEVEL >= DEBUG) \
    121128       printf("DEBUG::%s:%d:", __FILE__, __LINE__) && printf
    122129#else
     
    124131#endif
    125132     
    126 #if HARD_DEBUG_LEVEL >= vDEBUGING
     133#if HARD_DEBUG_LEVEL >= vDEBUG
    127134#define PRINTF5 \
    128      if (SOFT_DEBUG_LEVEL >= vDEBUGING) \
     135     if (SOFT_DEBUG_LEVEL >= vDEBUG) \
    129136       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
    130137#else
     
    143150///  PRINT: just prints output as is            ///
    144151///////////////////////////////////////////////////
     152#define PRINTNO      PRINT0
     153#define PRINTERR     PRINT1
     154#define PRINTWARN    PRINT2
     155#define PRINTINFO    PRINT3
     156#define PRINTDEBUG   PRINT4
     157#define PRINTVDEBUG  PRINT5
     158
    145159#ifdef  DEBUG
    146160#define PRINT(x) \
     
    172186#endif
    173187
    174 #if HARD_DEBUG_LEVEL >= DEBUGING
     188#if HARD_DEBUG_LEVEL >= DEBUG
    175189#define PRINT4 \
    176   if (SOFT_DEBUG_LEVEL >= DEBUGING) \
     190  if (SOFT_DEBUG_LEVEL >= DEBUG) \
    177191    printf
    178192#else
     
    180194#endif
    181195
    182 #if HARD_DEBUG_LEVEL >= vDEBUGING
     196#if HARD_DEBUG_LEVEL >= vDEBUG
    183197#define PRINT5 \
    184      if (SOFT_DEBUG_LEVEL >= vDEBUGING) \
     198     if (SOFT_DEBUG_LEVEL >= vDEBUG) \
    185199       printf("VERYDEBUG::%s:%d:", __FILE__, __LINE__) && printf
    186200#else
     
    196210  printf
    197211
    198 ///////////////////////////////////////////////////
    199 /// COUT: simple cout print with verbose-check  ///
    200 ///////////////////////////////////////////////////
    201 #ifdef  DEBUG
    202 #define COUT(x) \
    203            COUT ## x
    204 
    205 #if HARD_DEBUG_LEVEL >= 1
    206 #define COUT1 \
    207     if (SOFT_DEBUG_LEVEL >= 1 ) \
    208       cout
    209 #else
    210 #define COUT1 if (NO) cout
    211 #endif
    212      
    213 #if HARD_DEBUG_LEVEL >= 2
    214 #define COUT2 \
    215      if (SOFT_DEBUG_LEVEL >= 2 ) \
    216        cout
    217 
    218 #else
    219 #define COUT2 if (NO) cout
    220 #endif
    221      
    222 #if HARD_DEBUG_LEVEL >= 3
    223 #define COUT3 \
    224      if (SOFT_DEBUG_LEVEL >= 3 ) \
    225        cout
    226 #else
    227 #define COUT3 if (NO) cout
    228 #endif
    229      
    230 #if HARD_DEBUG_LEVEL >= 4
    231 #define COUT4 \
    232      if (SOFT_DEBUG_LEVEL >= 4 ) \
    233        cout
    234 #else
    235 #define COUT4 if (NO) cout
    236 #endif
    237      
    238      
    239 #else 
    240 #define COUT(x) if (NO) cout
    241 #endif
    242 
    243 #define COUT0 \
    244            cout
    245 
    246212#endif /* _DEBUG_H */
Note: See TracChangeset for help on using the changeset viewer.