This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Macro generation help


Are there any macro experts in the group?  I don't know if it's possible
for macros to generate comments, but if it is, I'd like to know how to
generate two varieties for the Doxygen commenting
.

First, an inline comment. For things like:

#define
DEF_ACTION(NAME,CODE,ARGS,prepfn,netprepfn,dofn,checkfn,argdecl,doc)  \
    { CODE, NAME, ARGS },

I'd like to change to something like:

#define
DEF_ACTION(NAM,CODE,ARGS,prepfn,netprepfn,dofn,checkfn,argdecl,DOC)  \
   { CODE, NAME, ARGS }, /*!< DOC */

That won't work as is, as the comment is repeated without replacement.

And somewhat similar for prepending comments:

#define
DEF_ACTION(name,code,args,prepfn,netprepfn,DOFN,checkfn,ARGDECL,doc)  \
    extern int DOFN ARGDECL;

to

#define
DEF_ACTION(name,code,args,prepfn,netprepfn,DOFN,checkfn,ARGDECL,DOC)  \
    /*! DOC */ \
    extern int DOFN ARGDECL;

Unfortunatly, working in C++ for many years, has reduced my macro skills
to parctically nil.








Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]