Proto2cpp is a Python script intended to be used as a Doxygen filter for Google Protocol Buffers files (.proto).
The script is released under GNU Lesser General Public License version 2.1.
How to enable this filter in Doxygen:
doxygen -g <filename>
doxygen -g doxyfile
JAVADOC_AUTOBRIEF
and set it enabled (this is required since version 0.6-beta)JAVADOC_AUTOBRIEF = YES
FILE_PATTERNS
and add *.proto
FILE_PATTERNS = *.proto
EXTENSION_MAPPING
and add proto=C
EXTENSION_MAPPING = proto=C
INPUT_FILTER
and add proto2cpp.py scriptINPUT_FILTER = "python proto2cpp.py"
doxygen doxyfile
If Doxygen output for the script itself is wanted, FULL_PATH_NAMES
in the Doxygen configuration should have value YES
since the script will skip the files named proto2cpp.py
.
The tarball available as well as Code section contains the filter (proto2cpp.py
), an example .proto
file, an example Doxygen configuration file, and a copy of GNU Lesser General Public License version 2.1.
The script has been tested on the following environments:
Ubuntu Desktop 12.04 LTS (32 bit)
Debian 6.0.4-i386
Ubuntu Desktop 12.10 (32 bit)
Windows 7 Home Premium (64 bit)
Windows 7 Home Premium (64 bit)
Windows 7 Home Premium (64 bit)
Windows 7 Home Premium (64 bit)
Windows 7 Home Premium (64 bit)
Windows 7 Home Premium (64 bit)
Windows 7 Home Premium (64 bit)
Ubuntu 10.04 LTS (32 bit)
I can't get the example provided in the download file to work with Doxygen v1.8.9.1 and proto2cpp v0.5-beta. If i open the file
html/index.html
I can not see any documentation. I've enabled logging and pasted the output of the generatedproto2cpp.log
file here. Did something change regarding input filtering in Doxygen? Do you know how-to fix it? It's working with v1.8.1.1 for me, as stated.Last edit: FlorianWolters 2015-04-23
Hi,
Thanks for your feedback.
Indeed it seems that the filter doesn't work with Doxygen v1.8.9.1. Unfortunately I don't have a quick-fix to provide, I'll have to take a deeper look at what has changed in Doxygen.
Forgot to reply to this discussion that a resolution to the problem was found and I fixed the instructions in Wiki page. Apparently there was a change in Doxygen's internal behaviour in v1.8.8 - since then one needs to add
EXTENSION_MAPPING = proto=C
That way Doxygen will use C language parser for .proto files and combined with this filter the files get proper Doxygen output.