o Added namespace and parsing support (Expat) to Kumu::XMLElement
(currently used only for Timed Text support). Also added some
new accessors.
+ o Altered MXF::UTF16String to use mbtowc() and wctomb().
o ...
}
}
- return RESULT_OK;
+ return result;
}
//
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_
//
inline T& operator*() const { return *m_p; }
inline T* operator->() const { return m_p; }
inline operator T*()const { return m_p; }
- inline const mem_ptr<T>& operator=(T* p) { set(p); return *this; }
+ inline const mem_ptr<T>& operator=(T* p) { this->set(p); return *this; }
inline T* set(T* p) { delete m_p; m_p = p; return m_p; }
inline T* get() const { return m_p; }
inline void release() { m_p = 0; }
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);
+}
+
//------------------------------------------------------------------------------------------