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
RevLine 
[493]1// -*- C++ -*- //
2
[921]3#ifndef LEMON_DEBUG_H
4#define LEMON_DEBUG_H
[493]5
6//! \file
7//! \brief Basic definitions for debug control.
8
[921]9namespace lemon {
[493]10
[680]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.
[493]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;
[619]25
26    static const int verbose = 5;
[493]27  };
28
[680]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  //!
[493]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;
[619]38    static const int verbose = 0;
[493]39  };
40
41#ifdef DEBUG
[680]42  //! The default debug mode.
43
44  //! The default debug mode.
45  //!
[493]46  typedef DebugOn DefaultDebugMode;
47#else
[680]48  //! The default debug mode.
49
50  //! The default debug mode.
51  //!
[493]52  typedef DebugOff DefaultDebugMode;
53#endif
54
55}
[921]56#endif // LEMON_DEBUG_H
Note: See TracBrowser for help on using the repository browser.