wiki:WikiStart

Doxygen Visual Basic filter

The  Doxygen Visual Basic filter is an awk script that converts Classic VB (VB6) and VB.NET code syntax to a C#-like syntax, so it can be read and understood by Doxygen.

It is inspired by the Visual Basic (classic) filter script written by Mathias Henze. More information about his script can be found in the  Helper Tools section on the Doxygen homepage.

Features

  • translates VB code to a c#like syntax, readable by Doxygen
  • supports Classic VB (VB6) and VB.NET
  • supports comments with all doxygen commands and XML tags
  • supports VS-like member comments
  • supports inline (member-) comments
  • recognizes: Enum (with member comments), Interface, Class, Structure
  • supports Namespaces
  • supports "Inherits" and "Implements"
  • lets doxygen detect constructors and static members
  • supports all possible member declarations
  • supports Declares
  • rewrites As Type definitions
  • rewrites Parameters
  • supports Array declarations

A more detailed feature comparison between the well known VB Filter by Mathias Henze
and the new VB filter by Vsevolod Kukol can be found here: FeatuesCompared

Download

You can download the latest version of the VB Filter in the Download section.

Latest Version: vbfilter-2.4.1.zip (Downloads: 1457)

To checkout the most recent code from the  svn repository
use TortoiseSVN on Windows or run the following command on Linux:

svn checkout http://trac.sevo.org/svn/doxyvb/trunk vbfilter

Latest Changes

[42] by sevo on 2011-10-11 09:54:17
  • fixed Type keyword recognition
[41] by sevo on 2011-10-10 00:35:13
  • fixed make system path handling on Windows
[40] by sevo on 2011-10-10 00:04:41
  • added support for nested classes
  • updated .NET example

Tickets

Resolution: fixed (2 matches)

Ticket Resolution Summary Modified
#2 fixed Let/set properties problem 4 months
#1 fixed Incorrect handling of VB6 functions that have an array as an argument 8 months

Resolution: None (2 matches)

Ticket Resolution Summary Modified
#4 None fatal error: internal error (SIGSEGV) 2 weeks
#3 None vb to c# parser fails on definition of types and classes 4 months

Instructions

In order to create documentation of Visual Basic code follow the following steps:

  1. Documenting your sources
  2. Install Doxygen
  3. Install the VB filter
  4. (optional) Configuring the filter
  5. (optional) Configuring Doxygen
  6. Creating Documentation

Sample Project

An example documentation is automatically generated from the sample files in the repository.

sample documentation:  http://trac.sevo.org/doxyvb/html/

sample documentation created using the old VB filter
with the same Doxyfile:  http://trac.sevo.org/doxyvb.old/html/

sample documentation integrated in trac: Trac Doxygen Plugin

Functionality / Limitations

The filter script processes only declarations and removes all algorithms or "the real code".

For example:

''' <summary>some function</summary>
Public Function SampleFunction(ByVal pFirst As Double) As Double
    Dim val As Double
    val = pFirst * 3 / 2    ' stupid example
    Return val
End Function 

will be parsed as:

''' <summary>some function</summary>
Public Function SampleFunction(ByVal pFirst As Double) As Double
End Function 

and passed to doxygen as:

/**
 * <summary>some function</summary>
 */
public Function Double SampleFunction (Double pFirst) ;

The result is not a real C# code! And it isn't meant to be C#!
It is something that Doxygen understands while the documentation
has almost exactly the original VB notation/syntax.



Compatibility

This script is optimized for the Doxygen C# parser and has been tested sucessfully with Doxygen 1.7.0
Older Doxygen versions can be used with some limitations (Read more: ./InstallingDoxygen/OldDoxygen).

It should work with every Awk version on all plattforms (tested with gawk 3.0.6)

Credits

Thanks got to:

  • Dimitri van Heesch for the wonderful documentation system Doxygen
  • Mathias Henze for the inspiration for my work
  • Mangala Sadhu Sangeet Singh for fixing apostrophe handling
  • Patrick Kursawe for adding nested classes support and overall optimization of the parser

License

Copyright © 2010-2011 by Vsevolod Kukol (sevo (at) sevo (dot) org)

This program is free software; you can redistribute it and/or modify it under the terms of the  GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.