summaryrefslogtreecommitdiff
path: root/src/KM_error.h
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_error.h
parentfe443bd90d915478994953b56836577a96ea4a28 (diff)
templates like this->
Diffstat (limited to 'src/KM_error.h')
-rwxr-xr-xsrc/KM_error.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/KM_error.h b/src/KM_error.h
index a91d416..2d3513a 100755
--- a/src/KM_error.h
+++ b/src/KM_error.h
@@ -114,6 +114,35 @@ namespace Kumu
return Kumu::RESULT_NULL_STR; \
}
+namespace Kumu
+{
+ // simple tracing mechanism
+ class DTrace_t
+ {
+ DTrace_t();
+
+ protected:
+ const char* m_Label;
+ Result_t* m_Watch;
+ int m_Line;
+ const char* m_File;
+ int m_Sequence;
+
+ public:
+ DTrace_t(const char* Label, Result_t* Watch, int Line, const char* File);
+ ~DTrace_t();
+ };
+}
+
+#ifdef KM_TRACE
+#define WDTRACE(l) DTrace_t __wl__Trace__((l), 0, __LINE__, __FILE__)
+#define WDTRACER(l,r) DTrace_t __wl__Trace__((l), &(r), __LINE__, __FILE__)
+#else
+#define WDTRACE(l)
+#define WDTRACER(l,r)
+#endif
+
+
#endif // _KM_ERROR_H_
//