src/work/klao/debug.h
author marci
Fri, 30 Apr 2004 13:52:17 +0000
changeset 495 6114a8ab5d27
child 619 e09818232531
permissions -rw-r--r--
(none)
klao@493
     1
// -*- C++ -*- //
klao@493
     2
klao@493
     3
#ifndef HUGO_DEBUG_H
klao@493
     4
#define HUGO_DEBUG_H
klao@493
     5
klao@493
     6
//! \file
klao@493
     7
//! \brief Basic definitions for debug control.
klao@493
     8
klao@493
     9
namespace hugo {
klao@493
    10
klao@493
    11
  struct DebugOn {
klao@493
    12
    //! Example: check whether the edges added to a path are adjacent
klao@493
    13
    static const bool consistensy_check = true;
klao@493
    14
klao@493
    15
    static const bool range_check = true;
klao@493
    16
klao@493
    17
    //! Examples: initialize maps with some value;
klao@493
    18
    //! after deleting an item from UnionFindEnum set its value in the
klao@493
    19
    //! corresponding map to NULL...
klao@493
    20
    static const bool ensure_safe_state = true;
klao@493
    21
  };
klao@493
    22
klao@493
    23
  struct DebugOff {
klao@493
    24
    static const bool consistensy_check = false;
klao@493
    25
    static const bool range_check = false;
klao@493
    26
    static const bool ensure_safe_state = false;
klao@493
    27
  };
klao@493
    28
klao@493
    29
#ifdef DEBUG
klao@493
    30
  typedef DebugOn DefaultDebugMode;
klao@493
    31
#else
klao@493
    32
  typedef DebugOff DefaultDebugMode;
klao@493
    33
#endif
klao@493
    34
klao@493
    35
}
klao@493
    36
#endif // HUGO_DEBUG_H