1 /*
2 * verbosity.h
3 *
4 * Created on: Apr 19, 2009
5 * Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2008
6 * Copyright: See COPYING file that comes with this distribution
7 */
8
9 #ifndef VERBOSITY_H_
10 #define VERBOSITY_H_
11
12 #include <iostream>
13
15
23 static bool verbosity;
24 public:
25 static void setVerbosity(bool b = true) {
26 verbosity = b;
27 }
28 static bool getVerbosity() {
29 return verbosity;
30 }
31 };
32
37 #define VERBOSE(s) if (Verbosity::getVerbosity()) std::cerr << s;
38
43 #define VERBOSELN(s) if (Verbosity::getVerbosity()) std::cerr << s << std::endl;
44
45 }
46
47 #endif /* VERBOSITY_H_ */
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
Utility class to output messages in case of verbose option is requested.
Definition: verbosity.h:22