source: git/factory/debug.h @ 362fc67

jengelh-datetimespielwiese
Last change on this file since 362fc67 was 362fc67, checked in by Martin Lee <martinlee84@…>, 11 years ago
chg: remove $Id$
  • Property mode set to 100644
File size: 1.2 KB
Line 
1/* emacs edit mode for this file is -*- C++ -*- */
2
3/* It should be possible to include this file multiple times for different */
4/* settings of DEBUGOUTPUT */
5
6#undef DEBINCLEVEL
7#undef DEBDECLEVEL
8#undef DEBOUTSL
9#undef DEBOUT
10#undef DEBOUTENDL
11#undef DEBOUTLN
12
13#ifdef DEBUGOUTPUT
14#include <iostream>
15#ifdef HAVE_IOSTREAM
16#include <iostream>
17#elif defined(HAVE_IOSTREAM_H)
18#include <iostream.h>
19#endif
20void deb_inc_level();
21void deb_dec_level();
22extern char * deb_level_msg;
23#define DEBINCLEVEL(stream, msg) \
24(std::stream << deb_level_msg << "entering << " << msg << " >>" << std::endl, deb_inc_level())
25#define DEBDECLEVEL(stream, msg) \
26(deb_dec_level(), std::stream << deb_level_msg << "leaving << " << msg << " >>" << std::endl)
27#define DEBOUTSL(stream) \
28(std::stream << deb_level_msg, std::stream.flush())
29#define DEBOUT(stream, objects) \
30(std::stream << objects, std::stream.flush())
31#define DEBOUTENDL(stream) \
32(std::stream << std::endl)
33#define DEBOUTLN(stream, objects) \
34(std::stream << deb_level_msg << objects << std::endl)
35#else /* DEBUGOUTPUT */
36#define DEBINCLEVEL(stream, msg)
37#define DEBDECLEVEL(stream, msg)
38#define DEBOUTSL(stream)
39#define DEBOUT(stream, objects)
40#define DEBOUTENDL(stream)
41#define DEBOUTLN(stream, objects)
42#endif /* DEBUGOUTPUT */
Note: See TracBrowser for help on using the repository browser.