diff options
| author | jhurst <jhurst@cinecert.com> | 2007-07-20 05:12:53 +0000 |
|---|---|---|
| committer | jhurst <> | 2007-07-20 05:12:53 +0000 |
| commit | deaf5cf9df866a1632a310ae4e5e774ae7aeca68 (patch) | |
| tree | 2f718c6d4ccac17ce10976beaf73569ab4cbe7f8 /src/KM_util.cpp | |
| parent | fe443bd90d915478994953b56836577a96ea4a28 (diff) | |
templates like this->
Diffstat (limited to 'src/KM_util.cpp')
| -rwxr-xr-x | src/KM_util.cpp | 20 |
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 = '='; |
