This is needed by path.h
authorhegyi
Wed, 08 Sep 2004 11:58:06 +0000
changeset 821283a7fe3a00e
parent 820 a9b6a7f73895
child 822 88226d9fe821
This is needed by path.h
src/hugo/debug.h
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/hugo/debug.h	Wed Sep 08 11:58:06 2004 +0000
     1.3 @@ -0,0 +1,56 @@
     1.4 +// -*- C++ -*- //
     1.5 +
     1.6 +#ifndef HUGO_DEBUG_H
     1.7 +#define HUGO_DEBUG_H
     1.8 +
     1.9 +//! \file
    1.10 +//! \brief Basic definitions for debug control.
    1.11 +
    1.12 +namespace hugo {
    1.13 +
    1.14 +  //! Debug mode for testing/debugging
    1.15 +
    1.16 +  //! Use this debug mode if you want exhaustive range and consistency checks.
    1.17 +  //! It also produces verbose debug messages.
    1.18 +  struct DebugOn {
    1.19 +    //! Example: check whether the edges added to a path are adjacent
    1.20 +    static const bool consistensy_check = true;
    1.21 +
    1.22 +    static const bool range_check = true;
    1.23 +
    1.24 +    //! Examples: initialize maps with some value;
    1.25 +    //! after deleting an item from UnionFindEnum set its value in the
    1.26 +    //! corresponding map to NULL...
    1.27 +    static const bool ensure_safe_state = true;
    1.28 +
    1.29 +    static const int verbose = 5;
    1.30 +  };
    1.31 +
    1.32 +  //! Debug mode for turning off debug aids.
    1.33 +
    1.34 +  //! This debud mode switches off all range and consistency checks,
    1.35 +  //! as well as the debug messages.
    1.36 +  //!
    1.37 +  struct DebugOff {
    1.38 +    static const bool consistensy_check = false;
    1.39 +    static const bool range_check = false;
    1.40 +    static const bool ensure_safe_state = false;
    1.41 +    static const int verbose = 0;
    1.42 +  };
    1.43 +
    1.44 +#ifdef DEBUG
    1.45 +  //! The default debug mode.
    1.46 +
    1.47 +  //! The default debug mode.
    1.48 +  //!
    1.49 +  typedef DebugOn DefaultDebugMode;
    1.50 +#else
    1.51 +  //! The default debug mode. 
    1.52 +
    1.53 +  //! The default debug mode. 
    1.54 +  //!
    1.55 +  typedef DebugOff DefaultDebugMode;
    1.56 +#endif
    1.57 +
    1.58 +}
    1.59 +#endif // HUGO_DEBUG_H