Doxygen for multilingual API

My company is developing an API for engineering programs. It is developed in C ++, but we create shells for it for the following languages:

  • proprietary language that resembles VB
  • MATLAB
  • and Python.

Currently, documentation is created through scripts, and it begins to take a lot of time to keep it 100%. I was wondering if there is a way to get doxygen / sphinx or another program to generate documentation for C / C ++, VB and MATLAB at a time. The Python part is executed by SWIG. Currently, the output looks something like this:

  • NameOfFunction
  • VB:
  • Function Name: Off Function (ByVal a As Long, ByRef b () As Long, ByVal c As Long) As Long
  • MATLAB:
  • value = NameOfFunction (a, b (), c)
  • C / C ++:
  • value * NameOfFunction (objtype1 * a, objecttype2 * b [], int c)
  • + Description
  • + Examples
+7
source share
3 answers

doxygen supports several languages,

to use it in several projects or folders and languages, you simply specify doxygen for each folder that you want to check in the config.

My favorite programming language is X. Can I use doxygen?

No, not as such; doxygen must understand the structure of what it reads. If you do not mind spending some time on this, there are several options:

Is language X supported?

If the grammar of X is close to C or C ++, then it is probably not too difficult to configure src / scanner.l a bit to support the language. This is done for all other languages ​​directly supported by doxygen (i.e. Java, IDL, C #, PHP). If the grammar of X is slightly different than you can write an input filter that translates X into something similar enough for C / C ++ for doxygen to understand (this approach is used for VB, Object Pascal and Javascript, see http: //www.stack .nl / ~ dimitri / doxygen / download.html # helpers ). If the grammar is completely different, you can write a parser for X and write a backend that creates a similar syntax tree, as src / scanner.l does (as well as src / tagreader.cpp when reading tag files).

however, since you use VB as proprietary, it can choose this language if you just simply change the file extensions to .vb files

heres how to use it with matlab

python and c ++ are already supported

take a look at the <AQ page

+3
source

The Doxygen website has a page with links to third-party helpers for different languages, which you can adapt:

http://www.stack.nl/~dimitri/doxygen/helpers.html

VB and MatLab filters are mentioned here.

+2
source

I was wondering if there is a way to get doxygen / sphinx or another program for creating documentation for c / C ++, VB and matlab at a time.

The Zeus editor has a doxygen function that allows you to create doxygen documentation for all elements of the Zeus workspace.

+2
source

All Articles