Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defclass netfarm-class (standard-class)
- ())
- (defclass netfarm-instance ()
- ((%name :initarg :name
- :reader netfarm-instance-name)
- (values :initarg :value-table
- :accessor netfarm-instance-value-table
- :initform (make-hash-table :test 'equal)))
- (:metaclass netfarm-class))
- (defmethod closer-mop:slot-value-using-class ((class netfarm-class) (instance netfarm-instance) slot-definition)
- (let* ((slot-name (closer-mop:slot-definition-name slot-definition))
- (slot-string (string-downcase slot-name)))
- (multiple-value-bind (value win)
- (gethash slot-string (netfarm-instance-value-table instance))
- (if win
- value
- (call-next-method)))))
- (defmethod closer-mop:validate-superclass ((class netfarm-class) (super-class standard-class))
- t)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement