diff -r 42188c7ea2d9 -r 82f11024044a Orb/Doxygen/src/xmlditatrace.h --- a/Orb/Doxygen/src/xmlditatrace.h Thu Jan 21 17:29:01 2010 +0000 +++ b/Orb/Doxygen/src/xmlditatrace.h Thu Mar 18 18:26:18 2010 +0000 @@ -2,15 +2,25 @@ #ifndef _XMLDITATRACE_H #define _XMLDITATRACE_H -/** \file This contains trace macros for DITA XMl processing */ +/** \file This contains trace macros for DITA XML processing */ + +#include "xmldita.h" -// TODO DITA_DOC_VISITOR_TRACE won't work on all DocNode objects, probably most have: -// op->type() and op->test().data() though. +// DITA_DOC_VISITOR_TRACE will work on all DocNode objects. #ifdef DITA_TRACE -#define DITA_DOC_VISITOR_TRACE(fn,op) printf("DITA_DOC_VISITOR: %s(): type=%d first=%d, last=%d text=`%s'\n", \ -fn,op->type(),op->isFirst(),op->isLast(),op->text().data()); +//#define DITA_DOC_VISITOR_TRACE(fn,op) printf("DITA_DOC_VISITOR: %s(): type=%d first=%d, last=%d text=`%s'\n", \ +//fn,op->type(),op->isFirst(),op->isLast(),op->text().data()); +#ifdef DITA_TRACE_TO_XML +#define DITA_DOC_VISITOR_TRACE(fn,pNode) xmlStream.comment(QString(fn)); +#define DITA_DOC_VISITOR_TRACE_NOARG(fn) xmlStream.comment(QString(fn)); +#else +#define DITA_DOC_VISITOR_TRACE(fn,pNode) printf("DITA_DOC_VISITOR: `%s': kind=%d node=0x%X, parent=0x%X\n", \ + fn, pNode->kind(), pNode,pNode->parent()); +#define DITA_DOC_VISITOR_TRACE_NOARG(fn) printf("DITA_DOC_VISITOR: `%s'\n", fn); +#endif #else #define DITA_DOC_VISITOR_TRACE(fn,op) +#define DITA_DOC_VISITOR_TRACE_NOARG(fn) #endif