klao@493: // -*- C++ -*- //
klao@493: 
alpar@921: #ifndef LEMON_DEBUG_H
alpar@921: #define LEMON_DEBUG_H
klao@493: 
klao@493: //! \file
klao@493: //! \brief Basic definitions for debug control.
klao@493: 
alpar@921: namespace lemon {
klao@493: 
alpar@680:   //! Debug mode for testing/debugging
alpar@680: 
alpar@680:   //! Use this debug mode if you want exhaustive range and consistency checks.
alpar@680:   //! It also produces verbose debug messages.
klao@493:   struct DebugOn {
klao@493:     //! Example: check whether the edges added to a path are adjacent
klao@493:     static const bool consistensy_check = true;
klao@493: 
klao@493:     static const bool range_check = true;
klao@493: 
klao@493:     //! Examples: initialize maps with some value;
klao@493:     //! after deleting an item from UnionFindEnum set its value in the
klao@493:     //! corresponding map to NULL...
klao@493:     static const bool ensure_safe_state = true;
klao@619: 
klao@619:     static const int verbose = 5;
klao@493:   };
klao@493: 
alpar@680:   //! Debug mode for turning off debug aids.
alpar@680: 
alpar@680:   //! This debud mode switches off all range and consistency checks,
alpar@680:   //! as well as the debug messages.
alpar@680:   //!
klao@493:   struct DebugOff {
klao@493:     static const bool consistensy_check = false;
klao@493:     static const bool range_check = false;
klao@493:     static const bool ensure_safe_state = false;
klao@619:     static const int verbose = 0;
klao@493:   };
klao@493: 
klao@493: #ifdef DEBUG
alpar@680:   //! The default debug mode.
alpar@680: 
alpar@680:   //! The default debug mode.
alpar@680:   //!
klao@493:   typedef DebugOn DefaultDebugMode;
klao@493: #else
alpar@680:   //! The default debug mode. 
alpar@680: 
alpar@680:   //! The default debug mode. 
alpar@680:   //!
klao@493:   typedef DebugOff DefaultDebugMode;
klao@493: #endif
klao@493: 
klao@493: }
alpar@921: #endif // LEMON_DEBUG_H