Mac
Mac

Reputation: 3559

Doxygen for a multi-language API

My company develops a API for engineering programs. It is developed in C++ but we create wrappers to it for the following languages:

Currently the documentation is generated by a bunch of scripts and it is starting to get time consuming to keep it 100%. I was wondering if there is a way to get doxygen/sphinx or another program to generate the documentation for C/C++, VB and MATLAB in one go. The Python part is done by SWIG. Currently the output is something like:

Upvotes: 9

Views: 3667

Answers (3)

Kevin Grant
Kevin Grant

Reputation: 5431

The Doxygen site has a page with links to 3rd-party helpers for various languages, that you may be able to adapt:

http://www.doxygen.nl/helpers.html

VB and MatLab filters are mentioned there.

Upvotes: 2

pyCthon
pyCthon

Reputation: 12341

doxygen supports multiple languages,

to use this on multiple projects or folders and languages you just point doxygen to every folder you want checked in the config.

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

No, not as such; doxygen needs to understand the structure of what it reads. If you don't mind spending some time on it, 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 hard to tweak src/scanner.l a bit so the language is supported. This is done for all other languages directly supported by doxygen (i.e. Java, IDL, C#, PHP). If the grammar of X is somewhat different than you can write an input filter that translates X into something similar enough to C/C++ for doxygen to understand (this approach is taken for VB, Object Pascal, and Javascript, see http://www.doxygen.nl/download.html#helpers). If the grammar is completely different one could write a parser for X and write a backend that produces a similar syntax tree as is done by src/scanner.l (and also by src/tagreader.cpp while reading tag files).

however since your using a VB like proprietary , it might pick this language up if you simply just change the file extensions to that of .vb

here is how to use it with matlab

python and c++ are already supported

have a look at the FAQ page

Upvotes: 4

jussij
jussij

Reputation: 10560

I was wondering if there is a way to get doxygen/sphinx or another program to generate the documentation for c/c++, VB and matlab on one go.

The Zeus editor has a doxygen feature that allows you to create doxygen documentation for all items in the Zeus workspace.

Upvotes: 2

Related Questions