Source-highlight Library
verbosity.h
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
14
namespace
srchilite
{
15
22
class
Verbosity
{
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_ */
srchilite
C++ class: doctemplate.h.
Definition:
bufferedoutput.cpp:13
srchilite::Verbosity
Utility class to output messages in case of verbose option is requested.
Definition:
verbosity.h:22
verbosity.h
Generated by
1.8.17