source: git/factory/debug.h @ 346edc8

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