3 #ifndef DUNE_DEBUGSTREAM_HH
4 #define DUNE_DEBUGSTREAM_HH
126 template <DebugLevel current, DebugLevel threshold>
128 static const bool value = (current >= threshold);
138 template <DebugLevel current, DebugLevel mask>
140 enum {
value = ((current & mask)!=0) };
202 _active = activator<thislevel,alevel>::value;
217 std::ostream& fallback = std::cerr)
224 _active = activator<thislevel,alevel>::value;
247 "There are streams still tied to this stream!");
262 if (activator<thislevel, dlevel>::value) {
284 if (activator<thislevel, dlevel>::value) {
299 if (activator<thislevel, dlevel>::value) {
314 if (activator<thislevel, dlevel>::value) {
330 if (activator<thislevel,alevel>::value) {
335 _actstack.push(
false);
341 if (_actstack.empty())
342 DUNE_THROW(DebugStreamError,
"No previous activation setting!");
355 return activator<thislevel, dlevel>::value &&
_active;
374 DUNE_THROW(DebugStreamError,
"Cannot detach initial stream!");
376 DUNE_THROW(DebugStreamError,
"Cannot detach a tied stream!");
400 DUNE_THROW(DebugStreamError,
"Cannot untie, stream is not tied!");
415 std::stack<bool> _actstack;