1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
5 ;;;; Name: ml-class.lisp
6 ;;;; Purpose: Markup Language Metaclass
7 ;;;; Programmer: Kevin M. Rosenberg
8 ;;;; Date Started: Apr 2000
10 ;;;; This metaclass as functions to classes to allow display
11 ;;;; in Text, HTML, and XML formats. This includes hyperlinking
12 ;;;; capability and sub-objects.
14 ;;;; $Id: ml-class.lisp,v 1.5 2002/10/11 23:51:33 kevin Exp $
16 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
18 ;;;; KMRCL users are granted the rights to distribute and use this software
19 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
20 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
21 ;;;; *************************************************************************
25 (declaim (optimize (speed 3) (safety 1)))
28 (defclass ml-class (standard-class)
29 ((title :initarg :title :type string :reader ml-std-title
31 "Print Title for class")
32 (fields :initarg :fields :reader ml-std-fields
34 "List of field lists for printing. Format is
35 ((fieldname type optional-formatter) ... )")
37 :initarg :subobjects-lists :reader ml-std-subobjects-lists
39 "List of fields that contain a list of subobjects objects.")
41 :initarg :ref-fields :type list :reader ml-std-ref-field
43 "List of fields that can be referred to by browsers.
44 Format is ((field-name field-lookup-func other-link-params) ...)")
46 ;;; The remainder of these fields are calculated one time
47 ;;; in finalize-inheritence.
48 (value-func :initform nil :type function :reader ml-std-value-func)
49 (xmlvalue-func :initform nil :type function :reader ml-std-xmlvalue-func)
50 (fmtstr-text :initform nil :type string :reader ml-std-fmtstr-text)
51 (fmtstr-html :initform nil :type string :reader ml-std-fmtstr-html)
52 (fmtstr-xml :initform nil :type string :reader ml-std-fmtstr-xml)
53 (fmtstr-text-labels :initform nil :type string :reader ml-std-fmtstr-text-labels)
54 (fmtstr-html-labels :initform nil :type string :reader ml-std-fmtstr-html-labels)
55 (fmtstr-xml-labels :initform nil :type string :reader ml-std-fmtstr-xml-labels)
56 (fmtstr-html-ref :initform nil :type string :reader ml-std-fmtstr-html-ref)
57 (fmtstr-xml-ref :initform nil :type string :reader ml-std-fmtstr-xml-ref)
58 (fmtstr-html-ref-labels :initform nil :type string :reader ml-std-fmtstr-html-ref-labels)
59 (fmtstr-xml-ref-labels :initform nil :type string :reader ml-std-fmtstr-xml-ref-labels)
61 (:default-initargs :title nil :fields nil :subobjects-lists nil :ref-fields nil)
62 (:documentation "Metaclass for Markup Language classes."))
66 (defmethod mop:finalize-inheritance :after ((cl ml-class))
70 (defmethod clos:finalize-inheritance :after ((cl ml-class))
74 (defmethod pcl:finalize-inheritance :after ((cl ml-class))
78 (defmethod clos:process-a-class-option ((class ml-class)
82 (error "ml-class title must have a value"))
83 (if (null (cdr value))
84 (list name (car value))
85 (list name `',value)))
88 (defmethod clos:process-a-class-option ((class ml-class)
92 (error "ml-class fields must have a value"))
96 (defmethod clos:process-a-class-option ((class ml-class)
97 (name (eql :ref-fields))
100 (error "ml-class ref-fields must have a value"))
101 (list name `',value))
104 (defmethod clos:process-a-class-option ((class ml-class)
105 (name (eql :subobjects-lists))
108 (error "ml-class subobjects-lists must have a value"))
109 (list name `',value))
111 ;;;; Class initialization function
113 (defun init-ml-class (cl)
114 (let ((fmtstr-text "")
117 (fmtstr-text-labels "")
118 (fmtstr-html-labels "")
119 (fmtstr-xml-labels "")
122 (fmtstr-html-ref-labels "")
123 (fmtstr-xml-ref-labels "")
127 (classname (class-name cl))
128 (ref-fields (slot-value cl 'ref-fields)))
129 (declare (ignore classname))
130 (dolist (f (slot-value cl 'fields))
132 (namestr (symbol-name (car f)))
133 (namestr-lower (string-downcase (symbol-name (car f))))
135 (formatter (caddr f))
137 (plain-value-func nil)
138 html-str xml-str html-label-str xml-label-str)
140 (when (or (eql type :integer) (eql type :fixnum))
141 (setq value-fmt "~d"))
143 (when (eql type :commainteger)
144 (setq value-fmt "~:d"))
146 (when (eql type :boolean)
147 (setq value-fmt "~a"))
150 (setq first-field nil)
152 (string-append fmtstr-text " ")
153 (string-append fmtstr-html " ")
154 (string-append fmtstr-xml " ")
155 (string-append fmtstr-text-labels " ")
156 (string-append fmtstr-html-labels " ")
157 (string-append fmtstr-xml-labels " ")
158 (string-append fmtstr-html-ref " ")
159 (string-append fmtstr-xml-ref " ")
160 (string-append fmtstr-html-ref-labels " ")
161 (string-append fmtstr-xml-ref-labels " ")))
163 (setq html-str value-fmt)
164 (setq xml-str (concatenate 'string "<" namestr-lower ">" value-fmt "</" namestr-lower ">"))
165 (setq html-label-str (concatenate 'string "<i>" namestr-lower "</i> " value-fmt))
166 (setq xml-label-str (concatenate 'string "<label>" namestr-lower "</label> <" namestr-lower ">" value-fmt "</" namestr-lower ">"))
168 (string-append fmtstr-text value-fmt)
169 (string-append fmtstr-html html-str)
170 (string-append fmtstr-xml xml-str)
171 (string-append fmtstr-text-labels namestr-lower " " value-fmt)
172 (string-append fmtstr-html-labels html-label-str)
173 (string-append fmtstr-xml-labels xml-label-str)
175 (if (find name ref-fields :key #'car)
177 (string-append fmtstr-html-ref "<~~a>" value-fmt "</~~a>")
178 (string-append fmtstr-xml-ref "<~~a>" value-fmt "</~~a>")
179 (string-append fmtstr-html-ref-labels "<i>" namestr-lower "</i> <~~a>" value-fmt "</~~a>")
180 (string-append fmtstr-xml-ref-labels "<label>" namestr-lower "</label> <~~a>" value-fmt "</~~a>"))
182 (string-append fmtstr-html-ref html-str)
183 (string-append fmtstr-xml-ref xml-str)
184 (string-append fmtstr-html-ref-labels html-label-str)
185 (string-append fmtstr-xml-ref-labels xml-label-str)))
188 (setq plain-value-func
189 (list `(,formatter (,(concat-symbol-pkg
190 :umlisp namestr) x))))
191 (setq plain-value-func
192 (list `(,(concat-symbol-pkg
193 :umlisp namestr) x))))
194 (setq value-func (append value-func plain-value-func))
196 (if (eql type :cdata)
197 (setq xmlvalue-func (append xmlvalue-func (list `(xml-cdata ,@plain-value-func))))
198 (setq xmlvalue-func (append xmlvalue-func plain-value-func)))
201 (setq value-func `(lambda (x) (values ,@value-func)))
202 (setq value-func (compile nil (eval value-func)))
203 (setq xmlvalue-func `(lambda (x) (values ,@xmlvalue-func)))
204 (setq xmlvalue-func (compile nil (eval xmlvalue-func)))
206 (setf (slot-value cl 'fmtstr-text) fmtstr-text)
207 (setf (slot-value cl 'fmtstr-html) fmtstr-html)
208 (setf (slot-value cl 'fmtstr-xml) fmtstr-xml)
209 (setf (slot-value cl 'fmtstr-text-labels) fmtstr-text-labels)
210 (setf (slot-value cl 'fmtstr-html-labels) fmtstr-html-labels)
211 (setf (slot-value cl 'fmtstr-xml-labels) fmtstr-xml-labels)
212 (setf (slot-value cl 'fmtstr-html-ref) fmtstr-html-ref)
213 (setf (slot-value cl 'fmtstr-xml-ref) fmtstr-xml-ref)
214 (setf (slot-value cl 'fmtstr-html-ref-labels) fmtstr-html-ref-labels)
215 (setf (slot-value cl 'fmtstr-xml-ref-labels) fmtstr-xml-ref-labels)
216 (setf (slot-value cl 'value-func) value-func)
217 (setf (slot-value cl 'xmlvalue-func) xmlvalue-func))
221 (defun ml-class-fmtstr-text (obj)
222 (slot-value (class-of obj) 'fmtstr-text))
224 (defun ml-class-fmtstr-html (obj)
225 (slot-value (class-of obj) 'fmtstr-html))
227 (defun ml-class-fmtstr-xml (obj)
228 (slot-value (class-of obj) 'fmtstr-xml))
230 (defun ml-class-fmtstr-text-labels (obj)
231 (slot-value (class-of obj) 'fmtstr-text-labels))
233 (defun ml-class-fmtstr-html-labels (obj)
234 (slot-value (class-of obj) 'fmtstr-html-labels))
236 (defun ml-class-fmtstr-xml-labels (obj)
237 (slot-value (class-of obj) 'fmtstr-xml-labels))
239 (defun ml-class-value-func (obj)
240 (slot-value (class-of obj) 'value-func))
242 (defun ml-class-xmlvalue-func (obj)
243 (slot-value (class-of obj) 'xmlvalue-func))
245 (eval-when (:compile-toplevel :load-toplevel :execute)
246 (defun ml-class-title (obj)
247 (awhen (slot-value (class-of obj) 'title)
252 (defun ml-class-subobjects-lists (obj)
253 (slot-value (class-of obj) 'subobjects-lists))
255 (defun ml-class-ref-fields (obj)
256 (slot-value (class-of obj) 'ref-fields))
258 (defun ml-class-fields (obj)
259 (slot-value (class-of obj) 'fields))
261 (defun ml-class-fmtstr-html-ref (obj)
262 (slot-value (class-of obj) 'fmtstr-html-ref))
264 (defun ml-class-fmtstr-xml-ref (obj)
265 (slot-value (class-of obj) 'fmtstr-xml-ref))
267 (defun ml-class-fmtstr-html-ref-labels (obj)
268 (slot-value (class-of obj) 'fmtstr-html-ref-labels))
270 (defun ml-class-fmtstr-xml-ref-labels (obj)
271 (slot-value (class-of obj) 'fmtstr-xml-ref-labels))
273 ;;; Class name functions
275 (defmethod ml-class-stdname ((name string))
276 (string-downcase (subseq name :start 1)))
278 (defmethod ml-class-stdname ((cl standard-object))
279 (string-downcase (subseq (class-name (class-of cl)) :start 1)))
281 ;;;; Generic Print functions
283 (defparameter *default-textformat* nil)
284 (defparameter *default-htmlformat* nil)
285 (defparameter *default-htmlrefformat* nil)
286 (defparameter *default-xmlformat* nil)
287 (defparameter *default-xmlrefformat* nil)
288 (defparameter *default-nullformat* nil)
289 (defparameter *default-init-format?* nil)
291 (defun make-format-instance (fmt)
292 (unless *default-init-format?*
293 (setq *default-textformat* (make-instance 'textformat))
294 (setq *default-htmlformat* (make-instance 'htmlformat))
295 (setq *default-htmlrefformat* (make-instance 'htmlrefformat))
296 (setq *default-xmlformat* (make-instance 'xmlformat))
297 (setq *default-xmlrefformat* (make-instance 'xmlrefformat))
298 (setq *default-nullformat* (make-instance 'nullformat))
299 (setq *default-init-format?* t))
302 (:text *default-textformat*)
303 (:html *default-htmlformat*)
304 (:htmlref *default-htmlrefformat*)
305 (:xml *default-xmlformat*)
306 (:xmlref *default-xmlrefformat*)
307 (:null *default-nullformat*)
308 (otherwise *default-textformat*)))
310 ;;;; Output format classes for print ml-classes
312 (defclass dataformat ()
313 ((file-start-str :type string :initarg :file-start-str :reader file-start-str)
314 (file-end-str :type string :initarg :file-end-str :reader file-end-str)
315 (list-start-fmtstr :type string :initarg :list-start-fmtstr :reader list-start-fmtstr)
316 (list-start-value-func :type function :initarg :list-start-value-func :reader list-start-value-func)
317 (list-start-indent :initarg :list-start-indent :reader list-start-indent)
318 (list-end-fmtstr :type string :initarg :list-end-fmtstr :reader list-end-fmtstr)
319 (list-end-value-func :type function :initarg :list-end-value-func :reader list-end-value-func)
320 (list-end-indent :initarg :list-end-indent :reader list-end-indent)
321 (obj-start-fmtstr :type string :initarg :obj-start-fmtstr :reader obj-start-fmtstr)
322 (obj-start-value-func :initarg :obj-start-value-func :reader obj-start-value-func)
323 (obj-start-indent :initarg :obj-start-indent :reader obj-start-indent)
324 (obj-end-fmtstr :type string :initarg :obj-end-fmtstr :reader obj-end-fmtstr)
325 (obj-end-value-func :initarg :obj-end-value-func :reader obj-end-value-func)
326 (obj-end-indent :initarg :obj-end-indent :reader obj-end-indent)
327 (obj-data-indent :initarg :obj-data-indent :reader obj-data-indent)
328 (obj-data-fmtstr :initarg :obj-data-fmtstr :reader obj-data-fmtstr)
329 (obj-data-fmtstr-labels :initarg :obj-data-fmtstr-labels :reader obj-data-fmtstr-labels)
330 (obj-data-end-fmtstr :initarg :obj-data-end-fmtstr :reader obj-data-end-fmtstr)
331 (obj-data-value-func :initarg :obj-data-value-func :reader obj-data-value-func)
332 (link-ref :initarg :link-ref :reader link-ref))
333 (:default-initargs :file-start-str nil :file-end-str nil :list-start-fmtstr nil :list-start-value-func nil
334 :list-start-indent nil :list-end-fmtstr nil :list-end-value-func nil :list-end-indent nil
335 :obj-start-fmtstr nil :obj-start-value-func nil :obj-start-indent nil
336 :obj-end-fmtstr nil :obj-end-value-func nil :obj-end-indent nil
337 :obj-data-indent nil :obj-data-fmtstr nil :obj-data-fmtstr-labels nil :obj-data-end-fmtstr nil
338 :obj-data-value-func nil :link-ref nil)
339 (:documentation "Parent for all dataformat objects"))
341 (defclass binaryformat (dataformat)
344 (defclass nullformat (dataformat)
347 (defun text-list-start-value-func (obj nitems)
348 (values (ml-class-title obj) nitems))
350 (defclass textformat (dataformat)
352 (:default-initargs :list-start-fmtstr "~a~P:~%"
353 :list-start-value-func #'text-list-start-value-func
356 :obj-data-fmtstr #'ml-class-fmtstr-text
357 :obj-data-fmtstr-labels #'ml-class-fmtstr-text-labels
358 :obj-data-end-fmtstr "~%"
359 :obj-data-value-func #'ml-class-value-func))
361 (defclass htmlformat (textformat)
363 (:default-initargs :file-start-str "<html><body>~%"
364 :file-end-str "</body><html>~%"
366 :list-start-fmtstr "<p><b>~a~P:</b></p><ul>~%"
367 :list-start-value-func #'text-list-start-value-func
368 :list-end-fmtstr "</ul>~%"
370 :list-end-value-func #'identity
372 :obj-start-fmtstr "<li>"
373 :obj-start-value-func #'identity
375 :obj-end-fmtstr "</li>~%"
376 :obj-end-value-func #'identity
378 :obj-data-fmtstr #'ml-class-fmtstr-html-labels
379 :obj-data-fmtstr-labels #'ml-class-fmtstr-html-labels
380 :obj-data-value-func #'ml-class-value-func))
383 (defun class-name-of (obj)
384 (string-downcase (class-name (class-of obj))))
386 (defun xmlformat-list-end-value-func (x)
387 (format nil "~alist" (string-downcase (class-name (class-of x)))))
389 (defun xmlformat-list-start-value-func (x nitems)
390 (values (format nil "~alist" (string-downcase (class-name (class-of x)))) (ml-class-title x) nitems))
392 (defclass xmlformat (textformat)
394 (:default-initargs :file-start-str "" ; (std-xml-header)
396 :list-start-fmtstr "<~a><title>~a~p:</title> ~%"
397 :list-start-value-func #'xmlformat-list-start-value-func
399 :list-end-fmtstr "</~a>~%"
400 :list-end-value-func #'xmlformat-list-end-value-func
401 :obj-start-fmtstr "<~a>"
402 :obj-start-value-func #'class-name-of
404 :obj-end-fmtstr "</~a>~%"
405 :obj-end-value-func #'class-name-of
408 :obj-data-fmtstr #'ml-class-fmtstr-xml
409 :obj-data-fmtstr-labels #'ml-class-fmtstr-xml-labels
410 :obj-data-value-func #'ml-class-xmlvalue-func))
412 (defclass link-ref ()
413 ((fmtstr :type function :initarg :fmtstr :accessor fmtstr)
414 (fmtstr-labels :type function :initarg :fmtstr-labels :accessor fmtstr-labels)
415 (page-name :type string :initarg :page-name :accessor page-name)
416 (href-head :type string :initarg :href-head :accessor href-head)
417 (href-end :type string :initarg :href-end :accessor href-end)
418 (ampersand :type string :initarg :ampersand :accessor ampersand))
419 (:default-initargs :fmtstr nil
421 :page-name "disp-func1"
422 :href-head nil :href-end nil :ampersand nil)
423 (:documentation "Formatting for a linked reference"))
425 (defclass html-link-ref (link-ref)
427 (:default-initargs :fmtstr #'ml-class-fmtstr-html-ref
428 :fmtstr-labels #'ml-class-fmtstr-html-ref-labels
433 (defclass xml-link-ref (link-ref)
435 (:default-initargs :fmtstr #'ml-class-fmtstr-xml-ref
436 :fmtstr-labels #'ml-class-fmtstr-xml-ref-labels
437 :href-head "xmllink xlink:type=\"simple\" xlink:href="
442 (defclass htmlrefformat (htmlformat)
444 (:default-initargs :link-ref (make-instance 'html-link-ref)))
446 (defclass xmlrefformat (xmlformat)
448 (:default-initargs :link-ref (make-instance 'xml-link-ref)))
451 ;;; File Start and Ends
453 (defmethod fmt-file-start ((fmt dataformat) (s stream)))
455 (defmethod fmt-file-start ((fmt textformat) (s stream))
456 (aif (file-start-str fmt)
459 (defmethod fmt-file-end ((fmt textformat) (s stream))
460 (aif (file-end-str fmt)
463 ;;; List Start and Ends
465 (defmethod fmt-list-start (x (fmt textformat) (s stream) &optional (indent 0) (num-items 1))
466 (if (list-start-indent fmt)
467 (indent-spaces indent s))
468 (aif (list-start-fmtstr fmt)
471 (funcall (list-start-value-func fmt) x num-items)))))
473 (defmethod fmt-list-end (x (fmt textformat) (s stream) &optional (indent 0) (num-items 1))
474 (declare (ignore num-items))
475 (if (list-end-indent fmt)
476 (indent-spaces indent s))
477 (aif (list-end-fmtstr fmt)
480 (funcall (list-end-value-func fmt) x)))))
482 ;;; Object Start and Ends
484 (defmethod fmt-obj-start (x (fmt textformat) (s stream) &optional (indent 0))
485 (if (obj-start-indent fmt)
486 (indent-spaces indent s))
487 (aif (obj-start-fmtstr fmt)
490 (funcall (obj-start-value-func fmt) x)))))
492 (defmethod fmt-obj-end (x (fmt textformat) (s stream) &optional (indent 0))
493 (if (obj-end-indent fmt)
494 (indent-spaces indent s))
495 (aif (obj-end-fmtstr fmt)
498 (funcall (obj-end-value-func fmt) x)))))
502 (defmethod make-link-start (obj (ref link-ref) fieldname fieldfunc fieldvalue refvars)
503 (declare (ignore obj fieldname))
504 (format nil "~a\"~a?func=~a~akey=~a~a\""
505 (href-head ref) (make-url (page-name ref)) fieldfunc
506 (ampersand ref) fieldvalue
509 (dolist (var refvars)
510 (string-append varstr (format nil "~a~a=~a"
511 (ampersand ref) (car var) (cadr var))))
515 (defmethod make-link-end (obj (ref link-ref) fieldname)
516 (declare (ignore obj fieldname))
517 (format nil "~a" (href-end ref))
520 (defmethod fmt-obj-data (x (fmt textformat) s
521 &optional (indent 0) (label nil) (refvars nil))
522 (if (obj-data-indent fmt)
523 (indent-spaces indent s))
525 (fmt-obj-data-with-ref x fmt s label refvars)
526 (fmt-obj-data-plain x fmt s label))
527 (aif (obj-data-end-fmtstr fmt)
530 (defmethod fmt-obj-data-plain (x (fmt textformat) s label)
533 (funcall (obj-data-fmtstr-labels fmt) x)
535 (funcall (funcall (obj-data-value-func fmt) x) x)))
536 (apply #'format s (funcall (obj-data-fmtstr fmt) x)
538 (funcall (funcall (obj-data-value-func fmt) x) x)))))
540 (defmethod fmt-obj-data-with-ref (x (fmt textformat) s label refvars)
541 (let ((refstr (make-ref-data-str x fmt label))
545 (funcall (funcall (obj-data-value-func fmt) x) x))))
547 ;; make list of reference link fields for printing to refstr template
548 (dolist (field (ml-class-ref-fields x))
550 (make-link-start x (link-ref fmt) (car field) (cadr field)
551 (nth (position (car field) (ml-class-fields x) :key #'car) field-values)
552 (append (caddr field) refvars)))
553 (link-end (make-link-end x (link-ref fmt) (car field))))
554 (push link-start refvalues)
555 (push link-end refvalues)))
556 (setq refvalues (nreverse refvalues))
558 (apply #'format s refstr refvalues)))
560 (defmethod obj-data (x)
561 "Returns the objects data as a string. Used by common-graphics outline function"
562 (let ((fmt (make-format-instance :text)))
563 (apply #'format nil (funcall (obj-data-fmtstr fmt) x)
565 (funcall (funcall (obj-data-value-func fmt) x) x)))))
567 (defmethod make-ref-data-str (x (fmt textformat) &optional (label nil))
568 "Return fmt string for that contains ~a slots for reference link start and end"
569 (unless (link-ref fmt)
570 (error "fmt does not contain a link-ref"))
573 (apply #'format nil (funcall (fmtstr-labels (link-ref fmt)) x)
575 (funcall (funcall (obj-data-value-func fmt) x) x)))
576 (apply #'format nil (funcall (fmtstr (link-ref fmt)) x)
577 (multiple-value-list (funcall (funcall (obj-data-value-func fmt) x) x))))))
580 ;;; Display method for objects
583 (defmethod load-all-subobjects (objs)
584 "Load all subobjects if they have not already been loaded."
586 (let ((objlist (mklist objs)))
587 (dolist (obj objlist)
588 (awhen (ml-class-subobjects-lists obj) ;; access list of functions
589 (dolist (child-obj it) ;; for each child function
590 (awhen (funcall (car child-obj) obj)
591 (load-all-subobjects it))))))
594 (defmethod output-ml-class (objs (fmt dataformat) (strm stream)
595 &optional (label nil) (english-only-function nil)
596 (indent 0) (subobjects nil) (refvars nil))
597 "Display a single or list of ml-class instances and their subobjects"
599 (setq objs (mklist objs))
600 (let ((nobjs (length objs)))
601 (fmt-list-start (car objs) fmt strm indent nobjs)
603 (unless (and english-only-function (not (funcall english-only-function obj)))
604 (fmt-obj-start obj fmt strm indent)
605 (fmt-obj-data obj fmt strm (1+ indent) label refvars)
607 (awhen (ml-class-subobjects-lists obj) ;; access list of functions
608 (dolist (child-obj it) ;; for each child function
609 (awhen (funcall (car child-obj) obj) ;; access set of child objects
610 (output-ml-class it fmt strm label
611 english-only-function
612 (1+ indent) subobjects refvars)))))
613 (fmt-obj-end obj fmt strm indent)))
614 (fmt-list-end (car objs) fmt strm indent nobjs))
617 (defun display-ml-class (objs &key (os *standard-output*) (format :text)
618 (label nil) (english-only-function nil) (subobjects nil)
619 (file-wrapper t) (refvars nil))
620 "EXPORTED Function: displays a ml-class. Simplies call to output-ml-class"
621 (let ((fmt (make-format-instance format)))
623 (fmt-file-start fmt os))
625 (output-ml-class objs fmt os label english-only-function 0 subobjects refvars))
627 (fmt-file-end fmt os)))