COIN-OR::LEMON - Graph Library

source: lemon-0.x/lemon/attic/debug.h @ 1956:a055123339d5

Last change on this file since 1956:a055123339d5 was 1956:a055123339d5, checked in by Alpar Juttner, 18 years ago

Unified copyright notices

File size: 1.9 KB
Line 
1/* -*- C++ -*-
2 *
3 * This file is a part of LEMON, a generic C++ optimization library
4 *
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
8 *
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
12 *
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
15 * purpose.
16 *
17 */
18
19#ifndef LEMON_DEBUG_H
20#define LEMON_DEBUG_H
21
22//! \file
23//! \brief Basic definitions for debug control.
24
25namespace lemon {
26
27  //! Debug mode for testing/debugging
28
29  //! Use this debug mode if you want exhaustive range and consistency checks.
30  //! It also produces verbose debug messages.
31  struct DebugOn {
32    //! Example: check whether the edges added to a path are adjacent
33    static const bool consistensy_check = true;
34
35    static const bool range_check = true;
36
37    //! Examples: initialize maps with some value;
38    //! after deleting an item from UnionFindEnum set its value in the
39    //! corresponding map to NULL...
40    static const bool ensure_safe_state = true;
41
42    static const int verbose = 5;
43  };
44
45  //! Debug mode for turning off debug aids.
46
47  //! This debud mode switches off all range and consistency checks,
48  //! as well as the debug messages.
49  //!
50  struct DebugOff {
51    static const bool consistensy_check = false;
52    static const bool range_check = false;
53    static const bool ensure_safe_state = false;
54    static const int verbose = 0;
55  };
56
57#ifdef DEBUG
58  //! The default debug mode.
59
60  //! The default debug mode.
61  //!
62  typedef DebugOn DefaultDebugMode;
63#else
64  //! The default debug mode.
65
66  //! The default debug mode.
67  //!
68  typedef DebugOff DefaultDebugMode;
69#endif
70
71}
72#endif // LEMON_DEBUG_H
Note: See TracBrowser for help on using the repository browser.