www.delorie.com/gnu/docs/guile/goops_26.html   search  
 
Buy GNU books!


Goops Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.4.2 Class Slots

Slots whose allocation is per-class rather than per-instance can be referenced and set without needing to specify any particular instance.

procedure: class-slot-ref class slot-name
Return the value of the slot named slot-name in class class. The named slot must have #:class or #:each-subclass allocation (see section allocation).

If there is no such slot with #:class or #:each-subclass allocation, class-slot-ref calls the slot-missing generic function with arguments class and slot-name. Otherwise, if the slot value is unbound, class-slot-ref calls the slot-missing generic function, with the same arguments.

procedure: class-slot-set! class slot-name value
Set the value of the slot named slot-name in class class to value. The named slot must have #:class or #:each-subclass allocation (see section allocation).

If there is no such slot with #:class or #:each-subclass allocation, class-slot-ref calls the slot-missing generic function with arguments class and slot-name.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003