5 #ifndef DUNE_DEBUGSTREAM_HH
6 #define DUNE_DEBUGSTREAM_HH
128 template <DebugLevel current, DebugLevel threshold>
130 static const bool value = (current >= threshold);
140 template <DebugLevel current, DebugLevel mask>
142 enum {
value = ((current & mask)!=0) };
204 _active = activator<thislevel,alevel>::value;
219 std::ostream& fallback = std::cerr)
226 _active = activator<thislevel,alevel>::value;
249 "There are streams still tied to this stream!");
264 if (activator<thislevel, dlevel>::value) {
286 if (activator<thislevel, dlevel>::value) {
301 if (activator<thislevel, dlevel>::value) {
316 if (activator<thislevel, dlevel>::value) {
332 if (activator<thislevel,alevel>::value) {
337 _actstack.push(
false);
343 if (_actstack.empty())
344 DUNE_THROW(DebugStreamError,
"No previous activation setting!");
357 return activator<thislevel, dlevel>::value &&
_active;
376 DUNE_THROW(DebugStreamError,
"Cannot detach initial stream!");
378 DUNE_THROW(DebugStreamError,
"Cannot detach a tied stream!");
402 DUNE_THROW(DebugStreamError,
"Cannot untie, stream is not tied!");
417 std::stack<bool> _actstack;