Re: [Doxygen-users] Doxygen Example Command - Appears Out of Order
Brought to you by:
dimitri
From: malcolm <ma...@ma...> - 2007-05-24 07:05:30
|
On Wednesday 23 May 2007 02:30:05 Moses Elias wrote: > Hi all, I use somthing like this: /*! * * \example s-lesson1.c List a relation on standard output. * \example s-lesson2.c List the tuples in \c Cars \c VW. ... ... */ /*! \page tutorial Tutorial Here are some example "C" files showing the use of the interface functions described in this documentation. - \ref s-lesson1.c <br>List a relation on standard output. This shows the use of cdb_open(), cdb_next(), rprint() and cdbCloseClient(). <br>\code % lesson1 Cars \endcode <br>The resulting output can be seen here \ref Cars.txt, and the structure of \c Cars is given by \ref Cars.dbls. - \ref s-lesson2.c <br>List the relation \c Cars on standard out where the domain \c make is equal to \c VW. As above but shows the use of attno(). <br>\code % lesson2 \endcode <br>View the output here \ref VWCars.txt <br>\Note This is equivalent to the AQL command <br>\code % db "Cars :: make == \"VW\"" \endcode ... ... */ > > When I run the following piece of code with the \include statement against > doxygen I get output as expected. The example program attached to the > \include statement gets incorporated immediately after the function exactly > where I want and expect it to appear. > > /*! \file example.cpp > * \brief description > */ > void example1(int a); > void example2(char c); > > /*! \fn void example1(int a) > * \brief a brief description of example1 > * \param a an integer parameter > * \return a void pointer > * \par Example: > * \include example_test.cpp > */ > > /*! \fn void example2(char c) > * \brief a brief description of example2 > * \param c a character parameter > */ > > However, when I replace the \include statement with the \example statement > - the order gets shifted. A "link" does not get created immedicately after > the function or in the order I expect. Instead the examples either get > bunched up together at the end of the file or I else have to access them > through the Examples page that is created. I want to associate particular > functions with particular snippets of code - and have them appear directly > under each other. > > I had hoped to control function documentation so they appear in the > following order. Function declaration, function parameters, returns, see > also (with a link), include, examples (with a link), etc. appear in that > order. However when it came to the \example statement that order gets > messed up. > > Is there any way to get the \example statement to behave like the \see > statement - except instead of linking to a particular function, a ink is > created to a particular code snippet? > > Regards, > > Moses |