I made a few mods to this, to enforce the script only on *.ice files.
Edit the
project.doxyfile as follows:
Code:
FILTER_PATTERNS = *.ice=./slice2doxy
Create a doxygen-script (call it 'slice2doxy') with the below contents. Make this script executable by the current user.
Code:
#!/bin/sh
sed -f sed.script
Create the sed-script below, called
sed.script:
Code:
# Skip C-style commenting
/\/\*/ , /\*\//b
/\/\/\(.*\)/b
s/module/namespace/
s/local//
s/idempotent//
s/dictionary/map/
s/sequence/vector/
#parse local interface
/interface/ , /{/ {
/interface/ {
#change interface to class
s/interface\(.*\)/class \1/
}
#change extends
s/extends/: public/
#add public before every keyword, but not {
/{/!s/,\(.*\)/, public \1/g
s/{/{public:/
}
s/nonmutating\(.*)\)/\1 const/
/throws/,/;/ {
s/throws/throw(/
s/;/);/
}
Now run your generation as normal
Code:
$ doxygen project.doxyfile