[postgis-devel] Doxygen linking is pretty neat

Paragon Corporation lr at pcorp.us
Fri May 1 23:49:14 PDT 2009


I've been playing around with making our code comments more Doxygen
friendly.  The 2 most useful constructs I have found

\brief  to make the comment appear as the short description for the function
in list of functions
\param  name parm -- description to describe each argument within the
description
\return description of return type -- which is really useful for C since
there are some many ints that are enums and so forth

And much sweeter -- within these you can include hyperlinks to other parts
of the autogenerated docs simply by preceding class,function etc term with a
#

So for example I went in lwalgorithm.c and Doxygen sugar coated a
description to something like

/*!
** \brief lwline_crossing_direction: returns the kind of #CG_LINE_CROSS_TYPE
behavior  of 2 linestrings
** \param l1 first line string
** \param l2 second line string
** \return a #CG_LINE_CROSS_TYPE
:
*/ 

This should appear soon in the autogenerated docs. 

Thanks,
Regina





More information about the postgis-devel mailing list