source: CMT/v1r16p20040901/src/cmt_log.h @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 1.0 KB
Line 
1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
4// See the complete license in cmt_license.txt "http://www.cecill.info".
5//-----------------------------------------------------------
6
7#ifndef __cmt_log_h__
8#define __cmt_log_h__
9
10#include "cmt_string.h"
11
12class CmtLogEnd
13{
14public:
15};
16
17class CmtLogDummy
18{
19public:
20};
21
22class CmtLog
23{
24public:
25  CmtLog ();
26
27  static CmtLogEnd& end ();
28  CmtLog& operator << (const cmt_string& s);
29  CmtLog& operator << (const char* c);
30  CmtLog& operator << (int i);
31  CmtLog& operator << (double d);
32  CmtLog& operator << (void* p);
33  CmtLog& operator << (CmtLogEnd& end);
34  CmtLog& operator << (CmtLogDummy& dummy);
35
36private:
37  bool check ();
38};
39
40#define Log static CmtLog log_instance
41#define log_endl CmtLog::end ()
42#define log      if (Cmt::get_debug ()) log_instance << "#CMT> (" << __FILE__ << "-" << __LINE__ << ") "
43#define log_cont if (Cmt::get_debug ()) log_instance
44
45#endif
Note: See TracBrowser for help on using the repository browser.