lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Another advantage of using Doxygen is that

1. you get free html documentation for your Bindings (since bindings
mimic C++ very closely)
2. In the latest version, you can use custom tags such as @dub to
change parameters used during binding:

  /** Some class.
   *
   * @dub string_format:'%%f'
   *      string_args:'(*userdata)->interval()'
   *      lib_name:'special_core'
   */

The second point is nice because it means that class maintenance (with
bindings) is reduced to the header file alone.

Gaspard

On Thu, Dec 16, 2010 at 6:38 PM, Michal Kottman <k0mpjut0r@gmail.com> wrote:
> On Thu, 2010-12-16 at 18:01 +0100, Philippe Lhoste wrote:
>> On 16/12/2010 16:22, Gaspard Bucher wrote:
>> > 1. generate xml documentation with Doxygen
>>
>> I have read that GCC is able to output XML out of C[++] code too.
>> Out of curiosity, why having chosen Doxygen instead of that? Simpler to parse?
>
> I think you are referring to gcc-xml [1]. A similar approach is used in
> Lqt bindings with the custom-written cpptoxml [2] parser.
>
> IMO the Doxygen output is better suited for binding - undocumented
> functions will simply not be bound. However, gccxml and cpptoxml will
> pick up every method it finds in header files :)
>
>
> [1] http://www.gccxml.org/
> [2] https://github.com/mkottman/lqt/tree/master/cpptoxml
>
>
>