equal
  deleted
  inserted
  replaced
  
    
    
     6 //! \file  | 
     6 //! \file  | 
     7 //! \brief Basic definitions for debug control.  | 
     7 //! \brief Basic definitions for debug control.  | 
     8   | 
     8   | 
     9 namespace hugo { | 
     9 namespace hugo { | 
    10   | 
    10   | 
         | 
    11   //! Debug mode for testing/debugging  | 
         | 
    12   | 
         | 
    13   //! Use this debug mode if you want exhaustive range and consistency checks.  | 
         | 
    14   //! It also produces verbose debug messages.  | 
    11   struct DebugOn { | 
    15   struct DebugOn { | 
    12     //! Example: check whether the edges added to a path are adjacent  | 
    16     //! Example: check whether the edges added to a path are adjacent  | 
    13     static const bool consistensy_check = true;  | 
    17     static const bool consistensy_check = true;  | 
    14   | 
    18   | 
    15     static const bool range_check = true;  | 
    19     static const bool range_check = true;  | 
    20     static const bool ensure_safe_state = true;  | 
    24     static const bool ensure_safe_state = true;  | 
    21   | 
    25   | 
    22     static const int verbose = 5;  | 
    26     static const int verbose = 5;  | 
    23   };  | 
    27   };  | 
    24   | 
    28   | 
         | 
    29   //! Debug mode for turning off debug aids.  | 
         | 
    30   | 
         | 
    31   //! This debud mode switches off all range and consistency checks,  | 
         | 
    32   //! as well as the debug messages.  | 
         | 
    33   //!  | 
    25   struct DebugOff { | 
    34   struct DebugOff { | 
    26     static const bool consistensy_check = false;  | 
    35     static const bool consistensy_check = false;  | 
    27     static const bool range_check = false;  | 
    36     static const bool range_check = false;  | 
    28     static const bool ensure_safe_state = false;  | 
    37     static const bool ensure_safe_state = false;  | 
    29     static const int verbose = 0;  | 
    38     static const int verbose = 0;  | 
    30   };  | 
    39   };  | 
    31   | 
    40   | 
    32 #ifdef DEBUG  | 
    41 #ifdef DEBUG  | 
         | 
    42   //! The default debug mode.  | 
         | 
    43   | 
         | 
    44   //! The default debug mode.  | 
         | 
    45   //!  | 
    33   typedef DebugOn DefaultDebugMode;  | 
    46   typedef DebugOn DefaultDebugMode;  | 
    34 #else  | 
    47 #else  | 
         | 
    48   //! The default debug mode.   | 
         | 
    49   | 
         | 
    50   //! The default debug mode.   | 
         | 
    51   //!  | 
    35   typedef DebugOff DefaultDebugMode;  | 
    52   typedef DebugOff DefaultDebugMode;  | 
    36 #endif  | 
    53 #endif  | 
    37   | 
    54   | 
    38 }  | 
    55 }  | 
    39 #endif // HUGO_DEBUG_H  | 
    56 #endif // HUGO_DEBUG_H  |