r3471: *** empty log message ***
[hyperobject.git] / base-class.lisp
diff --git a/base-class.lisp b/base-class.lisp
new file mode 100644 (file)
index 0000000..4c03156
--- /dev/null
@@ -0,0 +1,30 @@
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          base-class.lisp
+;;;; Purpose:       Definition of basic hyperobject class
+;;;; Programmer:    Kevin M. Rosenberg
+;;;; Date Started:  Apr 2000
+;;;;
+;;;; $Id: base-class.lisp,v 1.1 2002/11/25 02:10:38 kevin Exp $
+;;;;
+;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
+;;;; *************************************************************************
+
+(in-package :hyperobject)
+
+(defclass hyperobject ()
+  ()
+  (:metaclass hyperobject-class)
+  (:description "Basic hyperobject class"))
+
+
+(defmethod print-object ((obj hyperobject) (s stream))
+  (print-unreadable-object (obj s :type t :identity t)
+    (let ((fmt (make-instance 'hyperobject::textformat)))
+      (apply #'format 
+            s (funcall (obj-data-fmtstr fmt) obj)
+            (multiple-value-list 
+             (funcall (funcall (obj-data-value-func fmt) obj) obj))))))
+