ARTS  2.2.66
debug.h File Reference

Helper macros for debugging. More...

#include <iostream>
Include dependency graph for debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEBUG_ONLY(...)   __VA_ARGS__
 
#define DEBUG_COUNTER(n)
 
#define DEBUG_PRINT(e)
 
#define DEBUG_VAR(e)
 
#define DEBUG_VAR_FLT(p, e)
 

Detailed Description

Helper macros for debugging.

Author
Oliver Lemke
Date
2013-04-25

Definition in file debug.h.

Macro Definition Documentation

◆ DEBUG_COUNTER

#define DEBUG_COUNTER (   n)
Value:
{ \
static Index n = 0; \
std::cerr << "DBG: " << #n << ": " << ++n << std::endl; \
}
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:35

Definition at line 41 of file debug.h.

◆ DEBUG_ONLY

◆ DEBUG_PRINT

#define DEBUG_PRINT (   e)
Value:
{ \
std::cerr << "DBG: " << (e) << std::endl; \
}

Definition at line 48 of file debug.h.

◆ DEBUG_VAR

#define DEBUG_VAR (   e)
Value:
{ \
std::cerr << "DBG: " << #e << ": " << (e) << std::endl; \
}

Definition at line 54 of file debug.h.

◆ DEBUG_VAR_FLT

#define DEBUG_VAR_FLT (   p,
 
)
Value:
{ \
std::streamsize old_p = std::cerr.precision(); \
std::cerr << "DBG: " << #e << ": " << std::setprecision(p) \
<< (e) << std::endl << std::setprecision(old_p); \
}

Definition at line 60 of file debug.h.