version 1.21, 2005/11/18 21:19:11
|
version 1.22, 2005/11/22 21:07:15
|
|
|
#define PEG_METHOD_ENTER(traceComponent,methodName) | #define PEG_METHOD_ENTER(traceComponent,methodName) |
#define PEG_METHOD_EXIT() | #define PEG_METHOD_EXIT() |
#define PEG_TRACE_STRING(traceComponent,traceLevel,traceString) | #define PEG_TRACE_STRING(traceComponent,traceLevel,traceString) |
|
# define PEG_TRACE(VAR_ARGS) |
#else | #else |
/** Macro for tracing method entry | /** Macro for tracing method entry |
@param traceComponent component being traced | @param traceComponent component being traced |
@param methodName name of the method | @param methodName name of the method |
*/ | */ |
#define PEG_METHOD_ENTER(traceComponent,methodName) \ | #define PEG_METHOD_ENTER(traceComponent,methodName) \ |
const char *PEG_METHOD_NAME = methodName; \ |
static const char *PEG_METHOD_NAME = methodName; \ |
const Uint32 PEG_TRACE_COMPONENT = traceComponent; \ |
static const Uint32 PEG_TRACE_COMPONENT = traceComponent; \ |
Tracer::traceEnter(__FILE__,__LINE__,PEG_TRACE_COMPONENT,PEG_METHOD_NAME) |
if (Tracer::isTraceOn()) \ |
|
{ \ |
|
Tracer::traceEnter( \ |
|
__FILE__,__LINE__,PEG_TRACE_COMPONENT,PEG_METHOD_NAME); \ |
|
} \ |
| |
/** Macro for tracing method exit | /** Macro for tracing method exit |
*/ | */ |
#define PEG_METHOD_EXIT() \ | #define PEG_METHOD_EXIT() \ |
Tracer::traceExit(__FILE__,__LINE__,PEG_TRACE_COMPONENT,PEG_METHOD_NAME) |
do \ |
|
{ \ |
|
if (Tracer::isTraceOn()) \ |
|
Tracer::traceExit( \ |
|
__FILE__,__LINE__,PEG_TRACE_COMPONENT,PEG_METHOD_NAME); \ |
|
} \ |
|
while (0) |
| |
/** Macro for tracing a string | /** Macro for tracing a string |
@param traceComponent component being traced | @param traceComponent component being traced |
|
|
} \ | } \ |
while (0) | while (0) |
| |
|
# define PEG_TRACE(VAR_ARGS) \ |
|
do \ |
|
{ \ |
|
if (Tracer::isTraceOn()) \ |
|
Tracer::trace VAR_ARGS; \ |
|
} \ |
|
while (0) |
|
|
#endif | #endif |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |