stooop HTML browser

Contents

   Introduction 
   Usage 
   Output Format 
   Sample Output 
   Bugs and Limitations 
   Future Improvements 

Introduction

This is a class browser for Tcl code using the stooop extension. From the Tcl source code, a HTML document is
generated, with the class hierarchy and procedure and data members for each class, displayed as multi-level
lists. 

Usage

browse.tcl [-o destinationFile] [sourceFile]

The Tcl source file must be a valid Tcl program (an application that already runs is best), as the browser does
no checking on the Tcl code syntax. The browser can be used as a filter, as source and destination files are
optional. 

Output Format

First, the class hierarchy is displayed using a multi-level list, starting from base classes down to their derived
classes, as in:

hierarchy

   base 
      derived 
         derived 
         derived 
      derived 
   base 
      derived 
         derived 
            derived 
            derived 

Then the class composition is displayed, procedure members first followed by data members, with a specific
character style (normal, italic or underline) depending on the member nature, as in: 

classes

   className 
      normalProcedure {} 
      virtualProcedure {} 
      pureVirtualProcedure 
      staticProcedure {} 
      dataMember 
      staticDataMember 
      arrayDataMember() 

Sample Output

Input file is xifo.tcl, which contains code for the lifo and fifo classes, both derived from the xifo base class.

hierarchy

   xifo 
      fifo 
      lifo 

classes

   fifo 
      contents {} 
      fifo {} 
      out {} 
      ~fifo {} 
   lifo 
      contents {} 
      lifo {} 
      out {} 
      ~lifo {} 
   xifo 
      contents 
      empty {} 
      in {} 
      out 
      tidyUp {} 
      xifo {} 
      ~xifo {} 
      data() 
      first 
      last 
      maximumSize 
      size 
      unset 

Bugs and Limitations

The browser has not been thoroughly tested, and notably its behavior with commented code is subject to
improvements.

Future Improvements

May be converted to a stand-alone Tk application, using the great SpecTcl HTML text widget library.

Direct access to actual code at item position through a homegrown HTML extension. Clicking on a member
procedure name would open the corresponding Tcl source code file at the procedure definition line. For example,
positionning file xxx.tcl at line 100 could be done through the "xxx.tcl#100" link (please let me know if you know
of a HTML way of accessing a line from its number in a non HTML document).

