;;;; Author: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
-;;;; $Id: class-support.lisp,v 1.11 2003/06/10 22:30:16 kevin Exp $
+;;;; $Id: class-support.lisp,v 1.13 2003/06/15 07:48:30 kevin Exp $
;;;;
;;;; This file, part of UMLisp, is
;;;; Copyright (c) 2000-2003 by Kevin M. Rosenberg, M.D.
(defmethod fmt-eui ((e null))
(format nil "nil"))
+(defun cui-p (ui)
+ "Check if a string is a CUI"
+ (check-ui ui #\C 7))
+
+(defun lui-p (ui)
+ "Check if a string is a LUI"
+ (check-ui ui #\L 7))
+
+(defun sui-p (ui)
+ "Check if a string is a SUI"
+ (check-ui ui #\S 7))
+
+(defun tui-p (ui)
+ (check-ui ui #\T 3))
+
+(defun eui-p (ui)
+ (check-ui ui #\E 7))
+
+(defun check-ui (ui start-char len)
+ (when (and (stringp ui)
+ (= (length ui) (1+ len))
+ (char-equal start-char (schar ui 0))
+ (ignore-errors (parse-integer ui :start 1)))
+ t))
+
+
;;; Generic display functions
(eval-when (:compile-toplevel :load-toplevel :execute)
(multiple-value-bind (is-english is-term) (english-term-p obj)
(or (not is-term) is-english)))
-(defun print-umlsclass (obj &key (stream *standard-output*) (category :compact-text)
- (file-wrapper t) (english-only nil) (subobjects nil)
- (refvars nil))
+(defun print-umlsclass (obj &key (stream *standard-output*)
+ (category :compact-text)
+ (file-wrapper t) (english-only t) (subobjects nil)
+ (refvars nil) (link-printer nil))
(view obj :stream stream :category category :subobjects subobjects
:file-wrapper file-wrapper
:filter (if english-only nil #'english-term-filter)
+ :link-printer link-printer
:refvars refvars))
(defmacro define-lookup-display (newfuncname lookup-func)