blob: 096c894344ff1fe68ea6827f18aa6090da468120 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include "debug.h"
debug_ostream debug_cout;
debug_ostream::debug_ostream(): m_active(false) {}
void debug_ostream::activate()
{
m_active = true;
}
void debug_ostream::deactivate()
{
m_active = false;
}
debug_ostream& debug_ostream::operator<<(
std::basic_ostream<char>& (*func)
(std::basic_ostream<char>&) ) {
if (m_active)
std::cout << *func;
return *this;
}
|