COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/klao/debug.h @ 746:6ee2046cc210

Last change on this file since 746:6ee2046cc210 was 680:17415189e42a, checked in by Alpar Juttner, 21 years ago

Improved (but still not satisfactory) doc.

File size: 1.3 KB
RevLine 
[493]1// -*- C++ -*- //
2
3#ifndef HUGO_DEBUG_H
4#define HUGO_DEBUG_H
5
6//! \file
7//! \brief Basic definitions for debug control.
8
9namespace hugo {
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}
56#endif // HUGO_DEBUG_H
Note: See TracBrowser for help on using the repository browser.