RE: [Doxygen-users] Documenting from inside a function
Brought to you by:
dimitri
From: Glenn M. <gle...@vo...> - 2002-02-07 23:43:02
|
A way to do what you desire is with the @fn command followed by the = exact prototype. Where you are using it in your example now, it isn't = needed. That command block is already associated with foo. However, from within foo to get the comment block associated properly, = you can use the @fn. Another point which is minor, you can prefix lines within your comment = block with things like ** and Doxygen will ignore them. This way the = comment block will look like a comment block. See my example. What I don't know and haven't experimented with is whether the entire = documentation for a code item can be distributed. (In my stuff on = occassion, the comments can be separate from the code, but the comments = are in their entirety. I don't have piecemeal comments that get merged = together.) If Doxygen doesn't work with piecemeal comments and doesn't combine them = into one, what I would do is a perl input filter that collects the = comments and outputs them where they should be just prior to processing = by Doxygen. <snip> /** @brief foo is the bar. ** ** @param in_bar you're in. ** @param out_bar you're out. ** ** Here's overview stuff about foo and is automatically ** associated with foo just by its placement in front of foo. */ void foo (const Bar& in_bar,Bar& out_bar) { //... some distance into the fn body. // a point is encountered where it // would be nice to have a comment // that is both parsed by Doxygen // and "in place" in the code. /** @fn void foo (const Bar& in_bar,Bar& out_bar) ** ** @note The stuff immediately after ** this comment does something ** that I think you should know ** about, even if you're too ** lazy to look through it all. **/ out_bar << ::fooify(in_bar); //... } </snip> HTH, Glenn Maxey Technical Writer Voyant Technologies, Inc. 1765 West 121st Avenue Westminster, CO 80234-2301 Tel. +1 303.223.5164 Fax. +1 303.223.5275 gle...@vo... > -----Original Message----- > From: Smith, David [mailto:smi...@ty...] > Sent: Thursday, February 07, 2002 3:31 PM > To: dox...@li... > Subject: [Doxygen-users] Documenting from inside a function >=20 >=20 > <snip> > /** > @fn void foo (const Bar& in_bar,Bar& out_bar) > */ > void foo (const Bar& in_bar,Bar& out_bar) > { > //... some distance into the fn body. > // a point is encountered where it > // would be nice to have a comment > // that is both parsed by Doxygen > // and "in place" in the code. >=20 > /** > @note > The stuff immediately after > this comment does something > that I think you should know > about, even if you're too > lazy to look through it all. > */ >=20 > out_bar << ::fooify(in_bar); >=20 > //... > } > </snip> >=20 > Hi, >=20 > A quick question. Is it possible to get > Doxygen to associate comment blocks occurring > within a function body with that function? If > not, has anyone found a means to accomplish > something similar that they'd care to share? >=20 > Thanks much, > Dave >=20 > _______________________________________________ > Doxygen-users mailing list > Dox...@li... > https://lists.sourceforge.net/lists/listinfo/doxygen-users >=20 |