View Single Post
  #2 (permalink)  
Old 02-26-2008
ee_doright ee_doright is offline
Registered User
 
Name: Jonathan Sprinkle
Organization: University of Arizona
Project: Compositional Systems
 
Join Date: Feb 2008
Location: Tucson, Arizona, USA
Posts: 1
Updated patch

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
Reply With Quote