summaryrefslogtreecommitdiff
path: root/libs/audiographer/audiographer/debuggable.h
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2010-03-15 19:11:48 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2010-03-15 19:11:48 +0000
commit830911f6f9451d83a58043b3f9084d3caa164b7b (patch)
treef4ca4e3d86b51d66e7cecfb6b370cc4eb553e2d7 /libs/audiographer/audiographer/debuggable.h
parent44f4b84551d36ef4103d09452768f5ba53e0002c (diff)
Fix export, which has been broken since the boost::signals2 changes. Also update Audiographer, bacause of its incomplete sndfile handling. Audiographer is equal to revision 74
git-svn-id: svn://localhost/ardour2/branches/3.0@6760 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/audiographer/audiographer/debuggable.h')
-rw-r--r--libs/audiographer/audiographer/debuggable.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/libs/audiographer/audiographer/debuggable.h b/libs/audiographer/audiographer/debuggable.h
index 4126327b86..5ef382890b 100644
--- a/libs/audiographer/audiographer/debuggable.h
+++ b/libs/audiographer/audiographer/debuggable.h
@@ -10,16 +10,31 @@
namespace AudioGrapher
{
+/// Compile time defined debug level
enum DebugLevel
{
- DebugNone, //< Disabled
- DebugObject, //< Object level stuff, ctors, initalizers etc.
- DebugProcess, //< Process cycle level stuff
- DebugVerbose, //< Lots of output, not on sample level
- DebugSample //< Sample level stuff
+ DebugNone, ///< Disabled
+ DebugObject, ///< Object level stuff, ctors, initalizers etc.
+ DebugFlags, ///< Debug ProcessContext flags only on process cycle level
+ DebugProcess, ///< Process cycle level stuff
+ DebugVerbose, ///< Lots of output, not on sample level
+ DebugSample ///< Sample level stuff
};
-/// Class that allows optimizing out debugging code during compile time
+/** Class that allows optimizing out debugging code during compile time.
+ * Usage: to take all advantage of this class you should wrap all
+ * debugging statemets like this:
+ * \code
+ * if (debug_level (SomeDebugLevel) && other_optional_conditionals) {
+ * debug_stream() << "Debug output" << std::endl;
+ * }
+ * \endcode
+ *
+ * The order of the conditionals in the if-clause is important.
+ * The checks specified in \a other_optional_conditionals are only
+ * optimized out if \a debug_level() is placed before it with a
+ * logical and (short-circuiting).
+ */
template<DebugLevel L = DEFAULT_DEBUG_LEVEL>
class Debuggable
{