[Lemon-commits] [lemon_svn] hegyi: r1117 - hugo/trunk/src/hugo
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:43:20 CET 2006
Author: hegyi
Date: Wed Sep 8 13:58:06 2004
New Revision: 1117
Added:
hugo/trunk/src/hugo/debug.h
Log:
This is needed by path.h
Added: hugo/trunk/src/hugo/debug.h
==============================================================================
--- (empty file)
+++ hugo/trunk/src/hugo/debug.h Wed Sep 8 13:58:06 2004
@@ -0,0 +1,56 @@
+// -*- C++ -*- //
+
+#ifndef HUGO_DEBUG_H
+#define HUGO_DEBUG_H
+
+//! \file
+//! \brief Basic definitions for debug control.
+
+namespace hugo {
+
+ //! Debug mode for testing/debugging
+
+ //! Use this debug mode if you want exhaustive range and consistency checks.
+ //! It also produces verbose debug messages.
+ struct DebugOn {
+ //! Example: check whether the edges added to a path are adjacent
+ static const bool consistensy_check = true;
+
+ static const bool range_check = true;
+
+ //! Examples: initialize maps with some value;
+ //! after deleting an item from UnionFindEnum set its value in the
+ //! corresponding map to NULL...
+ static const bool ensure_safe_state = true;
+
+ static const int verbose = 5;
+ };
+
+ //! Debug mode for turning off debug aids.
+
+ //! This debud mode switches off all range and consistency checks,
+ //! as well as the debug messages.
+ //!
+ struct DebugOff {
+ static const bool consistensy_check = false;
+ static const bool range_check = false;
+ static const bool ensure_safe_state = false;
+ static const int verbose = 0;
+ };
+
+#ifdef DEBUG
+ //! The default debug mode.
+
+ //! The default debug mode.
+ //!
+ typedef DebugOn DefaultDebugMode;
+#else
+ //! The default debug mode.
+
+ //! The default debug mode.
+ //!
+ typedef DebugOff DefaultDebugMode;
+#endif
+
+}
+#endif // HUGO_DEBUG_H
More information about the Lemon-commits
mailing list