;;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10 -*- ;;;; --------------------------------------------------------------------- ;;;; File name: defsys.lsp ;;;; System: Zgraph Case Display ;;;; Author: Shawn Nicholson ;;;; Created: June 25, 2002 10:02:52 ;;;; Purpose: ;;;; --------------------------------------------------------------------- ;;;; Modified: Wednesday, May 28, 2003 at 14:27:52 by nicholson ;;;; --------------------------------------------------------------------- (in-package :common-lisp-user) #-qrg (error "You must first load qrg-setup.lisp.") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Load defsys for other modules required by this system if any #-fire-case-viewer (error "Zgraph display is not an independent system from the fire-case-viewer. Please load fire-case-viewer to load this subsystem") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Set up package (eval-when (:load-toplevel :compile-toplevel :execute) (defpackage :zgraph-case-display (:use :common-lisp :qrg))) ;;Provide the ability to move data to a separate package in the future. (eval-when (:compile-toplevel :load-toplevel :execute) (unless (find-package :data) (rename-package (find-package :cl-user) :common-lisp-user ;keep name the same '(:cl-user :user ;replace standard nicknames :data)))) ;add a new nickname (in-package :zgraph-case-display) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Global variables (defconstant *zgraph-case-display-version* "1.0") ;; current version number (defparameter *zgraph-case-display-path* (append-qrg-path fire-case-viewer::*case-viewer-path* "zgraph-display")) (defparameter *zgraph-case-display-files* nil) ;; Function to get case manager path (works for running under executable or devel environment) (defun get-zgraph-case-display-path (&key (subdirs nil) (filename nil) (filetype nil)) (qrg::get-path :root-path *zgraph-case-display-path* :subdirs subdirs :filename filename :filetype filetype)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; PackDoc stuff (eval-when (:load-toplevel :compile-toplevel :execute) (defmacro export-symbols (subpackage-name doc-string symbols) "Assigns a name and documentation to the group of symbols and exports them from the current package. If PackDoc has been loaded, subpackage documentation will also be generated." `(progn (export ,symbols) (when (member :packdoc *features*) (funcall (intern :subpackage-documentation :packdoc) ,subpackage-name ,symbols ,doc-string))))) #+packdoc (defun generate-zgraph-case-display-documentation (&key (output-path (qrg:append-qrg-path *zgraph-case-display-pathname* "docs")) (overwrite-files? t)) "Generates API documentation for the Case Mapper in HTML format. Files are written to qrg/fire/v1/case-manager/case-viewer/zgraph-display/docs/ by default." (flet ((doc-path (filename) (qrg:make-full-file-spec output-path filename ".html"))) (packdoc:document-package-to-file :zgraph-case-display (doc-path "zgraph-case-display-API") :html nil t :block) #+common-graphics (cg:beep) :done)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Load the export file (qrg:load-file *zgraph-case-display-path* "export" :action :load-source) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; List the system files (setq *zgraph-case-display-files* '( "general-utilities" "zgraph-case-display-objects" "case-graphs" "zgraph-case-display" "case-viewer-registration" )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Loading Function (defun load-zgraph-case-display (&key (action :source-if-newer) (verbose t) (force-load nil)) (cond ((and (not force-load) (member :zgraph-case-display qrg:*modules-loaded*)) (when verbose (format t "~%;;; Zgraph Case Display already loaded."))) (t ;; Load the text display code now (when verbose (format t "~%;;; Loading Zgraph Case Display.~%")) (qrg:load-files *zgraph-case-display-path* *zgraph-case-display-files* :action action :verbose verbose) (pushnew :zgraph-case-display *features*) (pushnew :zgraph-case-display qrg:*modules-loaded*)) :done)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; End Of Code