Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

btk_debug.h File Reference

#include <exception>
#include <string>

Include dependency graph for btk_debug.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  BTK
namespace  BTK::debug

Defines

#define DBG_OUT(level)   if (BTK::debug::debug_level >= (level)) std::cerr
#define BTK_ASSERT(expr, str)


Detailed Description

Things useful for debugging the BTK library.

Define Documentation

#define BTK_ASSERT expr,
str   ) 
 

Value:

if (!(expr)) {                                    \
                                      static BTK::debug::assert_code status =        \
                                            BTK::debug::EXIT;                        \
                                      if (status != BTK::debug::IGNORE) {            \
                status = BTK::debug::                        \
                     current_assert_handler((str),       \
                                                                        __FILE__,    \
                              __LINE__);   \
                                        if (BTK::debug::EXIT == status)              \
                  throw BTK::debug::BTKAssertion(str);       \
                                     }                                               \
                                   };

#define DBG_OUT level   )     if (BTK::debug::debug_level >= (level)) std::cerr
 

Debugging diagnostic output macro. Use this macro as you would use std::cerr in any source code where you want diagnostic (debug-only) output. The only difference between this macro and cerr is that it takes a diagnostic level as a parameter. If BTK::debug::debug_level is <= than the diagnostic level passed to this macro, the diagnostic output will be written to standard out. Otherwise, the output will be skipped. This macro evaluates to nothing in non-debug builds.


Generated on Wed Apr 14 00:43:18 2004 for BTK by doxygen 1.3.6