;;; ----------------------------------------------------------------------
;;; Objekte mit Slots
;;; ----------------------------------------------------------------------

(define-class slotted () '(object))

(define-method slotted sys!n-slots ()
  (length (sys!slots-structure self)))

(define-method slotted sys!slots-structure () ())

(define-method slotted clone ()
  (oos!simple-clone self (sys!n-slots self)))

(define-method symbol define-slotted-class (slots supers)
  (let* ((supers-struct (apply append 
			       (map (lambda (a-super)
				      (sys!slots-structure (class-named a-super)))
				    supers)))
	 (supers-and-my-struct (append supers-struct slots))
	 (new-instance (sysoos!define-class self supers-and-my-struct supers))
	 )
     (display "supers-struct: ") (display supers-struct)(newline)
     (display "my-struct: ") (display supers-and-my-struct)(newline)
    (sys!define-method self 'sys!slots-structure (lambda (self)
						   supers-and-my-struct))
    new-instance))
  
  

;;;eof
