
;;; ----------------------------------------------------------------------
;;; Convenience Marcos
;;; ----------------------------------------------------------------------

(defmacro define-method (class-name method-name args . body)
  (if (not (symbol? class-name)) (error "*** Class name " class-name 
					" must be a symbol."))
  (if (not (symbol? method-name)) (error "*** Method name " method-name
					" must be a symbol."))
  (display "define method ")
  (display method-name)
  (display " on ")
  (display class-name)
  (display "\n")
  `(sysoos!define-method (quote ,class-name)
			 (quote ,method-name)
			 (lambda ,(cons 'self args)
			   ,@body)))


(defmacro define-class (class-name . args)
  (if (not (symbol? class-name)) (error "*** define-class: Class name " class-name 
					" must be a symbol."))
  `(sysoos!define-class (quote ,class-name)
			,@args))


(defmacro define-mixin  (mixin-name supers)
  (if (not (symbol? mixin-name)) 
      (error "*** define-mixin: Mixin name " mixin-name
	     " must be a symbol."))
  (let ((realsupers (if (null? supers)
			(list 'mixin-top)
			supers)))
    `(sysoos!define-class (quote ,mixin-name)
			  ()
			  (quote ,realsupers))))

;eof
