Go Back   ZeroC Forums > Patches

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-19-2006
g00fy g00fy is offline
Registered User
 
Name: Salvania
Organization: Salvania
Project: Database systems
 
Join Date: Dec 2005
Posts: 45
Send a message via ICQ to g00fy
-->
Lightbulb "Patch" for using doxygen for slicefiles

Hereby attached you can find a little "howto" how to use DoxyGen to generate documentation for your project:

This is how I got it working:

1. Install Cygwin (www.cygwin.com), check that doxygen and sed is installed.
Code:
$ sed --version
GNU sed version 4.1.5
$ doxygen --version
1.4.6
2. Create a doxygen-script (I will assume you called it 'slice2doxy')
a] Make a small doxygen script, which only generates HTML files:
Code:
EXTRACT_ALL            = YES
QUIET                  = YES
FILE_PATTERNS          = *.ice
INPUT_FILTER           = "sed -f sed.script "
GENERATE_LATEX         = NO
b] Or get the full configuration file by running the following command:
Code:
doxygen -s -g slice2doxy
And edit it by hand to have all the options you want (but be sure it has the above options in it!)

3. Create a sed-script (I assume you call it 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/;/);/
}
4. Generate the HTMLs (or whatever you had in mind)
Code:
$ doxygen slice2doxy

If any questions, please fire ahead ;-)

PS: I made this little howto because I still couldn't figure out how to use docbook...
__________________
Steven Van Ingelgem
Salvania [http://www.salvania.be/]
Product Descr.: Statistical data analysis

Last edited by g00fy : 03-20-2006 at 03:32 AM.
Reply With Quote
  #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
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't "Ice-3.1.1-VC71.msi " include the "slice2java.exe"? Jason Gao Help Center 4 10-26-2006 11:23 AM
streaming function "write/readContext" for Ice::Context sylvain Help Center 0 09-13-2006 05:14 AM
Icepack registry "TimeOut" exception with heavy load eaglecn Help Center 1 05-26-2006 12:02 AM
"Invalid UTF8 string" when transer chinese chars between cpp server and csharp client raygo Help Center 8 03-21-2006 08:34 PM
Going from "in" to "out" param, using a class as a union catalin Help Center 1 04-05-2004 08:55 AM


All times are GMT -4. The time now is 07:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.