COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/klao/debug.h @ 963:5a7556e9e340

Last change on this file since 963:5a7556e9e340 was 921:818510fa3d99, checked in by Alpar Juttner, 20 years ago

hugo -> lemon

File size: 1.3 KB
Line 
1// -*- C++ -*- //
2
3#ifndef LEMON_DEBUG_H
4#define LEMON_DEBUG_H
5
6//! \file
7//! \brief Basic definitions for debug control.
8
9namespace lemon {
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.
15  struct DebugOn {
16    //! Example: check whether the edges added to a path are adjacent
17    static const bool consistensy_check = true;
18
19    static const bool range_check = true;
20
21    //! Examples: initialize maps with some value;
22    //! after deleting an item from UnionFindEnum set its value in the
23    //! corresponding map to NULL...
24    static const bool ensure_safe_state = true;
25
26    static const int verbose = 5;
27  };
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  //!
34  struct DebugOff {
35    static const bool consistensy_check = false;
36    static const bool range_check = false;
37    static const bool ensure_safe_state = false;
38    static const int verbose = 0;
39  };
40
41#ifdef DEBUG
42  //! The default debug mode.
43
44  //! The default debug mode.
45  //!
46  typedef DebugOn DefaultDebugMode;
47#else
48  //! The default debug mode.
49
50  //! The default debug mode.
51  //!
52  typedef DebugOff DefaultDebugMode;
53#endif
54
55}
56#endif // LEMON_DEBUG_H
Note: See TracBrowser for help on using the repository browser.