summaryrefslogtreecommitdiff
path: root/src/KM_util.cpp
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2007-07-20 05:12:53 +0000
committerjhurst <>2007-07-20 05:12:53 +0000
commitdeaf5cf9df866a1632a310ae4e5e774ae7aeca68 (patch)
tree2f718c6d4ccac17ce10976beaf73569ab4cbe7f8 /src/KM_util.cpp
parentfe443bd90d915478994953b56836577a96ea4a28 (diff)
templates like this->
Diffstat (limited to 'src/KM_util.cpp')
-rwxr-xr-xsrc/KM_util.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/KM_util.cpp b/src/KM_util.cpp
index 99bb4a9..6dd3d33 100755
--- a/src/KM_util.cpp
+++ b/src/KM_util.cpp
@@ -111,6 +111,26 @@ Kumu::Result_t::~Result_t() {}
//------------------------------------------------------------------------------------------
+// DTrace internals
+
+static int s_DTraceSequence = 0;
+
+Kumu::DTrace_t::DTrace_t(const char* Label, Kumu::Result_t* Watch, int Line, const char* File)
+ : m_Label(Label), m_Watch(Watch), m_Line(Line), m_File(File)
+{
+ m_Sequence = s_DTraceSequence++;
+ DefaultLogSink().Debug("@enter %s[%d] (%s at %d)\n", m_Label, m_Sequence, m_File, m_Line);
+}
+
+Kumu::DTrace_t::~DTrace_t()
+{
+ if ( m_Watch != 0 )
+ DefaultLogSink().Debug("@exit %s[%d]: %s\n", m_Label, m_Sequence, m_Watch->Label());
+ else
+ DefaultLogSink().Debug("@exit %s[%d]\n", m_Label, m_Sequence);
+}
+
+//------------------------------------------------------------------------------------------
const char fill = '=';