r3532: *** empty log message ***
[hyperobject.git] / base-class.lisp
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          base-class.lisp
6 ;;;; Purpose:       Definition of basic hyperobject class
7 ;;;; Programmer:    Kevin M. Rosenberg
8 ;;;; Date Started:  Apr 2000
9 ;;;;
10 ;;;; $Id: base-class.lisp,v 1.2 2002/12/02 15:57:17 kevin Exp $
11 ;;;;
12 ;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
13 ;;;; *************************************************************************
14
15 (in-package :hyperobject)
16 (eval-when (:compile-toplevel :execute)
17   (declaim (optimize (speed 2) (safety 2) (compilation-speed 0) (debug 2))))
18
19
20 (defclass hyperobject ()
21   ()
22   (:metaclass hyperobject-class)
23   (:description "Basic hyperobject class"))
24
25
26 (defmethod print-object ((obj hyperobject) (s stream))
27   (print-unreadable-object (obj s :type t :identity t)
28     (let ((fmt (make-instance 'hyperobject::textformat)))
29       (apply #'format 
30              s (funcall (obj-data-fmtstr fmt) obj)
31              (multiple-value-list 
32               (funcall (funcall (obj-data-value-func fmt) obj) obj))))))
33