+(defun find-default-presentation-attributes ()
+ (if (eql *default-attributes-class-name* 'default)
+ (find-presentation-attributes 'default)
+ (remove-duplicates (append
+ (find-presentation-attributes 'default)
+ (find-presentation-attributes
+ *default-attributes-class-name*)))))
+
+
+(defmacro with-default-attributes ((model-name) &body body)
+ `(let ((*default-attributes-class-name* ',model-name))
+ ,@body))
+
+(defun gen-ptype (type)
+ (let ((type (if (consp type) (car type) type)))
+ (or (second (find-attribute *default-attributes-class-name* type))
+ (second (find-attribute 'default type))
+ type)))
+
+(defun gen-presentation-slots (instance)
+ (mapcar #'(lambda (x) (gen-pslot (cadr x)
+ (string (car x))
+ (car x)))
+ (meta-model:list-slot-types instance)))
+
+
+(defun gen-pslot (type label slot-name)
+ (copy-list `(,(gen-ptype type)
+ :label ,label
+ :slot-name ,slot-name)))
+
+(defun gen-presentation-args (instance args)
+ (declare (ignore instance))
+ (if args args nil))