ARTS  2.4.0(git:4fb77825)
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; \
}

Definition at line 40 of file debug.h.

◆ DEBUG_ONLY

#define DEBUG_ONLY (   ...)    __VA_ARGS__

Definition at line 36 of file debug.h.

◆ 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.

Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39