Results 1 to 3 of 3

Thread: "Patch" for using doxygen for slicefiles

  1. #1
    g00fy is offline Registered User
    Name: Salvania
    Organization: Salvania
    Project: Database systems
    Join Date
    Dec 2005
    Posts
    45

    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...
    Last edited by g00fy; 03-20-2006 at 03:32 AM.
    Steven Van Ingelgem
    Salvania [http://www.salvania.be/]
    Product Descr.: Statistical data analysis

  2. #2
    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

  3. #3
    mwilson is offline Registered User
    Name: Mark Wilson
    Organization: University of Rochester
    Project: Omega EP laser
    Join Date
    Jul 2005
    Location
    Rochester, NY
    Posts
    100
    Hmm, this doesn't seem to work. I get errors from sed (this is on Solaris 10, Gnome desktop):

    Unrecognized command: /\/\*/ , /\*\//b

    Any idea what could be wrong?

    Thanks,
    Mark
    Mark E. Wilson
    Lead Programmer/Analyst
    Omega EP Project
    Laboratory for Laser Energetics (www.lle.rochester.edu)
    University of Rochester
    Rochester, NY 14623

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-31-2011, 07:32 PM
  2. Replies: 1
    Last Post: 06-09-2009, 10:53 PM
  3. Replies: 1
    Last Post: 01-28-2009, 06:15 AM
  4. Replies: 4
    Last Post: 10-26-2006, 11:23 AM
  5. Replies: 1
    Last Post: 04-05-2004, 08:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •