Orb/Doxygen/src/xmlditatrace.h
changeset 1 82f11024044a
parent 0 42188c7ea2d9
equal deleted inserted replaced
0:42188c7ea2d9 1:82f11024044a
     1 
     1 
     2 #ifndef _XMLDITATRACE_H
     2 #ifndef _XMLDITATRACE_H
     3 #define _XMLDITATRACE_H
     3 #define _XMLDITATRACE_H
     4 
     4 
     5 /** \file This contains trace macros for DITA XMl processing */
     5 /** \file This contains trace macros for DITA XML processing */
     6 
     6 
     7 // TODO DITA_DOC_VISITOR_TRACE won't work on all DocNode objects, probably most have:
     7 #include "xmldita.h"
     8 // op->type() and op->test().data() though.
     8 
       
     9 // DITA_DOC_VISITOR_TRACE will work on all DocNode objects.
     9 #ifdef DITA_TRACE
    10 #ifdef DITA_TRACE
    10 #define DITA_DOC_VISITOR_TRACE(fn,op) printf("DITA_DOC_VISITOR: %s(): type=%d first=%d, last=%d text=`%s'\n", \
    11 //#define DITA_DOC_VISITOR_TRACE(fn,op) printf("DITA_DOC_VISITOR: %s(): type=%d first=%d, last=%d text=`%s'\n", \
    11 fn,op->type(),op->isFirst(),op->isLast(),op->text().data());
    12 //fn,op->type(),op->isFirst(),op->isLast(),op->text().data());
       
    13 #ifdef DITA_TRACE_TO_XML
       
    14 #define DITA_DOC_VISITOR_TRACE(fn,pNode) xmlStream.comment(QString(fn));
       
    15 #define DITA_DOC_VISITOR_TRACE_NOARG(fn) xmlStream.comment(QString(fn));
       
    16 #else
       
    17 #define DITA_DOC_VISITOR_TRACE(fn,pNode) printf("DITA_DOC_VISITOR: `%s': kind=%d node=0x%X, parent=0x%X\n", \
       
    18 	fn, pNode->kind(), pNode,pNode->parent());
       
    19 #define DITA_DOC_VISITOR_TRACE_NOARG(fn) printf("DITA_DOC_VISITOR: `%s'\n", fn);
       
    20 #endif
    12 #else
    21 #else
    13 #define DITA_DOC_VISITOR_TRACE(fn,op)
    22 #define DITA_DOC_VISITOR_TRACE(fn,op)
       
    23 #define DITA_DOC_VISITOR_TRACE_NOARG(fn)
    14 #endif
    24 #endif
    15 
    25 
    16 
    26 
    17 #endif //_XMLDITATRACE_H
    27 #endif //_XMLDITATRACE_H