1

I'm going to write documentation for some script API bindings (Lua actually), so there's no source code at all. How can I do that?

I've tried to write bare doxygen like this:

\page My API document

\class BindedClassA
\brief descriptions on it

\var member1
\brief ssssssss

\fn bindedMethod1(arg1, arg2)
\brief xxxxxxx
\param arg1 yyyyyyy
\param arg2 zzzzzzz
\return wwwwww

It won't work at all. Actually it seems you must specify a language for every doxygen input file via EXTENSION_MAPPING.

Then I tried to put things in a fake C++ file that have no source code but only comments:

/**
 *\page My API document
 **/

/**
 *\class BindedClassA
 *\brief descriptions on it
 **/

/**
 *\var member1
 *\brief ssssssss
 **/

/**
 *\fn bindedMethod1(arg1, arg2)
 *\brief xxxxxxx
 *\param arg1 yyyyyyy
 *\param arg2 zzzzzzz
 *\return wwwwww
 **/

It generates document for BindedClassA, but only have brief description, no members o method documents were generated.

It seems the structure in source code plays critical role for Doxygen working properly, but I have no source at all.

jiandingzhe
  • 1,881
  • 15
  • 35
  • 1
    Which version of doxygen are you using? What setting are there in your doxygen configuration file different from the standard settings (`doxygen -x Doxyfile` in the newer versions of doxygen). Note `\func` is not a doxygen command, maybe you meant `\fn`. You will probably need some dummy source code and also use the commands like `\defgroup` etc. – albert Jul 08 '21 at 07:45
  • Did you google for e.g. "lua doxygen" ? (I see https://github.com/alecchen/doxygen-lua/tree/master/example, is very old and I don't know the quality) – albert Jul 08 '21 at 08:03
  • @albert it's a typo, in my actual code it is `\fn`. I'm using doxygen version 1.8.13. When processing the bare document, I specified it as `INPUT`, and all other configs are default. – jiandingzhe Jul 08 '21 at 08:04
  • What is the extension used? 1.8.13 is quite old (December 2016), the current version is 1.9.1 – albert Jul 08 '21 at 08:09
  • @albert I'm not using extensions. The doxygen I installed is inside WSL Debian buster. – jiandingzhe Jul 08 '21 at 11:38
  • doxgen has the possibility to use "filters" so that languages (as lua) that are not directly supported can be documented by transforming the code (for doxygen) in something doxygen understands. I don't directly see a way to document without some dummy code / some "prototypes", commands like `\fn` try to place the out of place documentation with the relevant source. – albert Jul 08 '21 at 12:01

0 Answers0