lilypond-0.0.61
[lilypond.git] / hdr / debug.hh
blob92715dbfdc1fab1d9387a494da1c7b5756acf78b
1 #ifndef DEBUG_HH
2 #define DEBUG_HH
4 #include <assert.h>
5 #include <iostream.h>
6 #include "dstream.hh"
7 #include "real.hh"
8 #include "proto.hh"
10 void message( String message_str, char const* context_ch_c_l );
11 void warning( String message_str, char const* context_ch_c_l );
12 void error( String message_str, char const* context_ch_c_l );
13 void error(String s); // errors
14 void error_t(const String& s, Time_description const & t_tdes);
15 void error_t(String const &s, const Moment &when);
16 // warnings
17 //void warning(String s);
18 #define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
19 extern ostream &warnout ;
21 // progress
22 extern ostream *mlog;
24 // debugging
25 extern Dstream *monitor; // monitor
27 #ifdef NPRINT
28 #define mtor if (0) *monitor // clever hack
29 #else
30 #define mtor if (check_debug) monitor->identify_as(__PRETTY_FUNCTION__)
31 #endif
33 extern bool check_debug;
35 #endif