TraceCreationMixin.h
// TraceCreationMixin.h
//
// Author David Barrett-Lennard
// (C)opyright Cedanet Pty Ltd 2009
@import "IObject.h"
#include "Ceda/cxUtils/Tracer.h"
namespace ceda
{
///////////////////////////////////////////////////////////////////////////////////////////////////
// TraceCreationMixin
$mixin TraceCreationMixin
{
$$()
{
if (BaseClass::EnableTrace())
{
Tracer() << BaseClass::ClassName() << "()\n";
}
}
~$$()
{
if (BaseClass::EnableTrace())
{
Tracer() << '~' << BaseClass::ClassName() << "()\n";
}
}
};
$mixin TraceCreationMixin2
{
$$()
{
if (BaseClass::EnableTrace())
{
Tracer() << BaseClass::ClassName() << "() " << $this << '\n';
}
}
~$$()
{
if (BaseClass::EnableTrace())
{
Tracer() << '~' << BaseClass::ClassName() << "() " << $this << '\n';
}
}
};
} // namespace ceda