This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: GOOPS's class hierarchy
- To: guile at sourceware dot cygnus dot com
- Subject: Re: GOOPS's class hierarchy
- From: Keisuke Nishida <kxn30 at po dot cwru dot edu>
- Date: 15 May 2000 22:23:35 -0400
- References: <m3r9b3b6yd.fsf@kei.cwru.edu>
Keisuke Nishida <kxn30@po.cwru.edu> writes:
> Does anyone have a graphical figure of GOOPS's class hierarchy
> or a graph generator?
Yes, I wrote it...
(use-modules (oop goops))
(define (class-string-name class)
(if (slot-bound? class 'name)
(string-append "\"" (class-name class) "\"")
"\"#<anonymous>\""))
(define (build-dotty-graph class)
(let ((name (class-string-name class)))
(for-each (lambda (subclass)
(display " ")
(display name)
(display "->")
(display (class-string-name subclass))
(newline)
(build-dotty-graph subclass))
(class-direct-subclasses class))))
(display "digraph G {\n")
(build-dotty-graph <top>)
(display "}\n")
Output:
http://www.research.att.com/~north/cgi-bin/webdot.cgi/http://home.cwru.edu/~kxn30/hierarchy.dot.gif
Thanks to webdot:
http://www.research.att.com/~north/cgi-bin/webdot.cgi
Thanks,
Keisuke Nishida