[fpc-devel] Class chart generator

Michael Van Canneyt michael at freepascal.org
Mon Aug 25 16:15:24 CEST 2008


Hi,

I just committed a small program under fpdoc - fpclasschart - which will create 
a XML tree with all classes/objects/interfaces it finds in a set of files.
The sources are parsed and forward class declarations are skipped.

It has support for merging class trees. It's thoroughly tested on FCL-base and 
RTL and gives nice results (resulting in about 210 classes).

I think we should think about how to use and integrate this in the help system,
comments and suggestions are therefor more than welcome.

Michael.

PS. For the daring, here are the command-lines needed to create the class charts 
for the RTL and fcl:

../utils/fpdoc/fpclasschart \
  --output=rtlclasses.xml \
  --input="-dfpdocsystem -dHASGETHEAPSTATUS -dSUPPORT_DOUBLE ../rtl/linux/system.pp -Fi../rtl/linux -Fi../rtl/unix -Fi../rtl/inc -Fi../rtl/i386 -dCPU32 -dHASVARIANT -dFPC_HAS_TYPE_EXTENDED -dHASWIDECHAR " \
  --input="-dHASINTF ../rtl/objpas/objpas.pp " \
  --input="../rtl/unix/sysutils.pp -Fi../rtl/objpas/sysutils -Fi../rtl/inc " \
  --input="../rtl/objpas/strutils.pp " \
  --input="../rtl/inc/strings.pp -Fi../rtl/i386 -Fi../rtl/inc " \
  --input="../rtl/unix/mouse.pp -Fi../rtl/inc " \
  --input="../rtl/unix/keyboard.pp -Fi../rtl/inc " \
  --input="../rtl/unix/crt.pp -Fi../rtl/inc " \
  --input="../rtl/unix/video.pp -Fi../rtl/inc " \
  --input="../rtl/unix/dos.pp -Fi../rtl/inc -dcpui386 " \
  --input="-dver1_0 ../rtl/unix/sockets.pp -Fi../rtl/inc -Fi../rtl/linux " \
  --input="../rtl/inc/objects.pp -Fi../rtl/i386 -Fi../rtl/linux " \
  --input="../rtl/inc/heaptrc.pp -Fi../rtl/i386 -Fi../rtl/linux " \
  --input="../rtl/i386/mmx.pp -Fi../rtl/linux " \
  --input="../rtl/unix/ipc.pp -Fi../rtl/linux " \
  --input="../rtl/unix/printer.pp -Fi../rtl/linux -Fi../rtl/inc " \
  --input="../rtl/objpas/typinfo.pp -Fi../rtl/linux "  \
  --input="../rtl/unix/ports.pp -Fi../rtl/linux " \
  --input="../rtl/inc/getopts.pp -Fi../rtl/linux " \
  --input="../rtl/go32v2/emu387.pp -Fi../rtl/i386 " \
  --input="../rtl/go32v2/dxeload.pp -Fi../rtl/i386 " \
  --input="../rtl/go32v2/go32.pp -Fi../rtl/i386 " \
  --input="-dVER1_0 ../rtl/linux/gpm.pp -Fi../rtl/i386 " \
  --input="../packages/graph/src/unix/graph.pp -Fi../packages/graph/src/inc " \
  --input="../rtl/linux/oldlinux.pp -Fi../rtl/linux -Fi../rtl/unix " \
  --input="../rtl/unix/unixtype.pp -Fi../rtl/unix -Fi../rtl/linux -Fi../rtl/linux/i386 " \
  --input="../rtl/unix/baseunix.pp -Fi../rtl/unix -Fi../rtl/linux -Fi../rtl/linux/i386 "  \
  --input="../rtl/unix/unix.pp -Fi../rtl/unix -Fi../rtl/linux -Fi../rtl/linux/i386 " \
  --input='../rtl/unix/classes.pp -Fi../rtl/objpas/classes  -dfpdocsystem' \
  --input="../rtl/unix/unixutil.pp " \
  --input="../rtl/unix/x86.pp " \
  --input="../rtl/inc/dynlibs.pas -Fi../rtl/unix " \
  --input="../rtl/linux/linux.pp -Fi../rtl/linux -Fi../rtl/unix " \
  --input="../rtl/objpas/math.pp -Fi../rtl/i386 -dFPC_HAS_TYPE_EXTENDED " \
  --input="../rtl/inc/matrix.pp -Fi../rtl/inc " \
  --input="../rtl/objpas/dateutils.pp -Fi../rtl/objpas " \
  --input="../packages/graph/src/win32/wincrt.pp"


../utils/fpdoc/fpclasschart --output=fclclasses.xml  --merge=rtlclasses.xml  \
  --input="-S2 ../packages/fcl-base/src/iostream.pp"  \
  --input="../packages/fcl-process/src/pipes.pp"  \
  --input="../packages/fcl-base/src/streamio.pp"  \
  --input="../packages/fcl-process/src/process.pp"  \
  --input="../packages/fcl-process/src/dbugintf.pp"   \
  --input="../packages/fcl-base/src/contnrs.pp"  \
  --input="../packages/paszlib/src/zstream.pp"  \
  --input="../packages/fcl-base/src/idea.pp"  \
  --input="../packages/fcl-base/src/bufstream.pp"  \
  --input="../packages/fcl-base/src/base64.pp"   \
  --input="../packages/fcl-base/src/gettext.pp"  \
  --input="../packages/fcl-web/src/ezcgi.pp"  \
  --input="../packages/fcl-base/src/pooledmm.pp"  \
  --input="../packages/fcl-process/src/dbugmsg.pp"  \
  --input="../packages/fcl-base/src/streamex.pp"  \
  --input="../packages/fcl-base/src/inicol.pp"  \
  --input="../packages/fcl-base/src/streamcoll.pp"  \
  --input="../packages/fcl-base/src/cachecls.pp"  \
  --input="../packages/fcl-base/src/eventlog.pp"  \
  --input="../packages/fcl-base/src/syncobjs.pp"  \
  --input="../packages/fcl-base/src/custapp.pp"  \
  --input="../packages/fcl-base/src/blowfish.pp"  \
  --input="../packages/fcl-process/src/simpleipc.pp"  \
  --input="../packages/fcl-base/src/inifiles.pp"  \
  --input="../packages/fcl-base/src/rttiutils.pp"



More information about the fpc-devel mailing list