X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=attrib-class.lisp;h=05a0778492aa28061f71086fc58cdd6b5a621a5e;hb=1245205caa5937842d5d13ec805e15fe0d6a88c2;hp=4d88e66addc17ae0f1dbe6367c359fcce0049767;hpb=5e5cc3c20a925d8af5de153a118fdaf0792dd7e2;p=kmrcl.git diff --git a/attrib-class.lisp b/attrib-class.lisp index 4d88e66..05a0778 100644 --- a/attrib-class.lisp +++ b/attrib-class.lisp @@ -7,18 +7,18 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: attrib-class.lisp,v 1.1 2002/10/06 13:21:47 kevin Exp $ +;;;; $Id: attrib-class.lisp,v 1.3 2002/10/06 13:35:30 kevin Exp $ ;;;; -;;;; This file, part of Genutils, is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; This file, part of Kmrcl, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; -;;;; Genutils users are granted the rights to distribute and use this software +;;;; Kmrcl users are granted the rights to distribute and use this software ;;;; as governed by the terms of the GNU General Public License. ;;;; ************************************************************************* ;;;; Defines a metaclass that allows the use of attributes (or subslots) ;;;; on slots. Based on example in AMOP, but modified to use ACL's MOP. -(in-package :genutils) +(in-package :kmrcl) (defclass attributes-dsd (mop::standard-direct-slot-definition) ((attributes :initarg :attributes :initform nil @@ -45,7 +45,7 @@ (declare (ignorable slot)) (apply #'make-instance 'attributes-esd - :attributes (remove-duplicates (gu:mapappend #'attributes dsds)) + :attributes (remove-duplicates (mapappend #'attributes dsds)) (excl::compute-effective-slot-definition-initargs cl dsds)) ) @@ -98,27 +98,27 @@ #|| -(in-package :genutils) +(in-package :kmrcl) (defclass credit-rating () ((level :attributes (date-set time-set)) (id :attributes (person-setting))) - (:metaclass genutils:attributes-class)) + (:metaclass kmrcl:attributes-class)) (defparameter cr (make-instance 'credit-rating)) -(format t "~&date-set: ~a" (gu:slot-attribute cr 'level 'date-set)) -(setf (gu:slot-attribute cr 'level 'date-set) "12/15/1990") -(format t "~&date-set: ~a" (gu:slot-attribute cr 'level 'date-set)) +(format t "~&date-set: ~a" (slot-attribute cr 'level 'date-set)) +(setf (slot-attribute cr 'level 'date-set) "12/15/1990") +(format t "~&date-set: ~a" (slot-attribute cr 'level 'date-set)) (defclass monitored-credit-rating (credit-rating) ((level :attributes (last-checked interval date-set)) (cc :initarg :cc) (id :attributes (verified)) ) - (:metaclass gu:attributes-class)) + (:metaclass attributes-class)) (defparameter mcr (make-instance 'monitored-credit-rating)) -(setf (gu:slot-attribute mcr 'level 'date-set) "01/05/2002") -(format t "~&date-set for mcr: ~a" (gu:slot-attribute mcr 'level 'date-set)) +(setf (slot-attribute mcr 'level 'date-set) "01/05/2002") +(format t "~&date-set for mcr: ~a" (slot-attribute mcr 'level 'date-set)) ||#