THtml and doxygen

Hi Rooters,

I know that ROOT is a framework and has also its own doc generator and
I don’t mind to bore you with compatibility between Doxygen and THtml,
but sometimes is necessary to port some already written code into ROOT
framework and 2 problem arises, at least for me.

  1. If i’m not wrong, ROOT requires doc for functions to be written inside
    the body while Doxygen forbid it

  2. the simbol “//!” has a special meaning following class members in ROOT
    but it used to describe members in Doxygen

Is there any work around to avoid write again documentation in source code?

Thanks and Cheers, Germano

Hi Germano,

[quote=“germano”]1) If i’m not wrong, ROOT requires doc for functions to be written inside the body while Doxygen forbid it[/quote]The new THtml version (due in a few months - it should arrive in August) will allow you to customize where it should look for documentation.

[quote=“germano”]2) the simbol “//!” has a special meaning following class members in ROOT but it used to describe members in Doxygen[/quote]That’s a different issue, as this has nothing to do with THtml, but with Cint. There is no work-around I would know of - from the ROOT point of view. You might be able to set doxygen’s member description tag to something different.

[quote=“germano”]Is there any work around to avoid write again documentation in source[/quote]Yes, use THtml-style from the beginning :wink:

Axel.

Ok

[quote=“Axel”] That’s a different issue, as this has nothing to do with THtml, but with Cint. There is no work-around I would know of - from the ROOT point of view. You might be able to set doxygen’s member description tag to something different.
[/quote]
Yes it’s possible to set tag to something else, now; the problem is for past program but, OK.
Anyway, why do you say “//!” comes from CINT?
If I wrote a regular C++ program with some data members of a class
followed by this token, do you mean that when writing to file this class member
is written?

Time reversing is not possible, till now… :wink:

Cheers, Germano

Hi Germano,

[quote=“germano”]Anyway, why do you say “//!” comes from CINT?
If I wrote a regular C++ program with some data members of a class
followed by this token, do you mean that when writing to file this class member is written?[/quote]The “//!” is not a THtml / documentation issue. It’s a flag for Cint that this member must not be written to file. Thus, THtml can’t do anything about it, nor can you - that’s why the best option is to change all occurrences of “//!” in your doxygen documented code to e.g. “///~” or something, and set “///~” as doxygen’s tag for member documentation.

If you leave the documentation for the class members starting with “//!”, these class members will not be written to a file.

Axel.

Hi Axel

Sorry, maybe I was not clear.
From the beginning I knew that “//!” TAG comes from something else than THtml,
and I’m disappointed to have not stated it clearly.
But After you told me it’s a CINT feature I wondered if writing a Class for ROOT
normally compiled (so not involving CINT), the data members cannot be
avoided to be written if this is what I would to be.

Cheers, Germano

P.S: ///< do the job for Doxygen, but I know you are not interested in it :wink:

//! is not a CINT feature but ROOT feature.
It indicates that teh corresponding data member is only transient.
For a list of teh few special charactesr in teh comment field,
see the ROOt Users Guide, I/O chapter and see sections
"Automatically Generated Streamers"
“transient Data members”
“Pointers to Objects”
“Prevent Splitting”
“Variable length Arrays”

Rene

[quote=“brun”]//! is not a CINT feature but ROOT feature.
Rene[/quote]

This is why I posted on ROOT discussions.
I saw ROOT User’s Guide and it’s where I found that info.
But when Axel, that is surely more expert than me, told me it’s a CINT feature,
some doubts arose…

But, anyway, conclusion of this topic seems to be “change your style
to comment data members”

Cheers, Germano