src/work/peter/path/debug.h
author ladanyi
Thu, 04 Nov 2004 21:28:55 +0000
changeset 960 908a1a6f0752
parent 815 468c9ec86928
permissions -rw-r--r--
Renamed simann_test.cc to simann_demo.cc.
hegyi@815
     1
// -*- C++ -*- //
hegyi@815
     2
alpar@921
     3
#ifndef LEMON_DEBUG_H
alpar@921
     4
#define LEMON_DEBUG_H
hegyi@815
     5
hegyi@815
     6
//! \file
hegyi@815
     7
//! \brief Basic definitions for debug control.
hegyi@815
     8
alpar@921
     9
namespace lemon {
hegyi@815
    10
hegyi@815
    11
  //! Debug mode for testing/debugging
hegyi@815
    12
hegyi@815
    13
  //! Use this debug mode if you want exhaustive range and consistency checks.
hegyi@815
    14
  //! It also produces verbose debug messages.
hegyi@815
    15
  struct DebugOn {
hegyi@815
    16
    //! Example: check whether the edges added to a path are adjacent
hegyi@815
    17
    static const bool consistensy_check = true;
hegyi@815
    18
hegyi@815
    19
    static const bool range_check = true;
hegyi@815
    20
hegyi@815
    21
    //! Examples: initialize maps with some value;
hegyi@815
    22
    //! after deleting an item from UnionFindEnum set its value in the
hegyi@815
    23
    //! corresponding map to NULL...
hegyi@815
    24
    static const bool ensure_safe_state = true;
hegyi@815
    25
hegyi@815
    26
    static const int verbose = 5;
hegyi@815
    27
  };
hegyi@815
    28
hegyi@815
    29
  //! Debug mode for turning off debug aids.
hegyi@815
    30
hegyi@815
    31
  //! This debud mode switches off all range and consistency checks,
hegyi@815
    32
  //! as well as the debug messages.
hegyi@815
    33
  //!
hegyi@815
    34
  struct DebugOff {
hegyi@815
    35
    static const bool consistensy_check = false;
hegyi@815
    36
    static const bool range_check = false;
hegyi@815
    37
    static const bool ensure_safe_state = false;
hegyi@815
    38
    static const int verbose = 0;
hegyi@815
    39
  };
hegyi@815
    40
hegyi@815
    41
#ifdef DEBUG
hegyi@815
    42
  //! The default debug mode.
hegyi@815
    43
hegyi@815
    44
  //! The default debug mode.
hegyi@815
    45
  //!
hegyi@815
    46
  typedef DebugOn DefaultDebugMode;
hegyi@815
    47
#else
hegyi@815
    48
  //! The default debug mode. 
hegyi@815
    49
hegyi@815
    50
  //! The default debug mode. 
hegyi@815
    51
  //!
hegyi@815
    52
  typedef DebugOff DefaultDebugMode;
hegyi@815
    53
#endif
hegyi@815
    54
hegyi@815
    55
}
alpar@921
    56
#endif // LEMON_DEBUG_H