author | marci |
Fri, 14 May 2004 18:08:29 +0000 | |
changeset 641 | bfd6c14e2975 |
parent 493 | bbd1db03f0fe |
child 680 | 17415189e42a |
permissions | -rw-r--r-- |
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@619 | 21 |
|
klao@619 | 22 |
static const int verbose = 5; |
klao@493 | 23 |
}; |
klao@493 | 24 |
|
klao@493 | 25 |
struct DebugOff { |
klao@493 | 26 |
static const bool consistensy_check = false; |
klao@493 | 27 |
static const bool range_check = false; |
klao@493 | 28 |
static const bool ensure_safe_state = false; |
klao@619 | 29 |
static const int verbose = 0; |
klao@493 | 30 |
}; |
klao@493 | 31 |
|
klao@493 | 32 |
#ifdef DEBUG |
klao@493 | 33 |
typedef DebugOn DefaultDebugMode; |
klao@493 | 34 |
#else |
klao@493 | 35 |
typedef DebugOff DefaultDebugMode; |
klao@493 | 36 |
#endif |
klao@493 | 37 |
|
klao@493 | 38 |
} |
klao@493 | 39 |
#endif // HUGO_DEBUG_H |