ARTS  2.3.1285(git:92a29ea9-dirty)
debug.h File Reference

Helper macros for debugging. More...

#include <iostream>

Go to the source code of this file.

Macros

#define DEBUG_ONLY(...)   __VA_ARGS__
 
#define DEBUG_COUNTER(n)
 
#define DEBUG_PRINT(e)   { std::cerr << "DBG: " << (e) << std::endl; }
 
#define DEBUG_VAR(e)   { std::cerr << "DBG: " << #e << ": " << (e) << std::endl; }
 
#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:39

Definition at line 40 of file debug.h.

◆ DEBUG_ONLY

◆ DEBUG_PRINT

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

Definition at line 47 of file debug.h.

◆ DEBUG_VAR

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

Definition at line 51 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 55 of file debug.h.