Method: (RUCKSACK-SLOT-INDEX STANDARD-RUCKSACK T T)

Source

(defmethod rucksack-slot-index ((rucksack standard-rucksack) class slot
                                &key (errorp nil) (include-superclasses nil))
  (unless (symbolp class)
    (setq class (class-name class)))
  (unless (symbolp slot)
    (setq slot (slot-definition-name slot)))
  (let ((slot-index-tables (slot-index-tables rucksack)))
    (flet ((find-index (class)
             (let ((slot-index-table (btree-search slot-index-tables class
                                                   :errorp nil)))
 	       (and slot-index-table
                    (btree-search slot-index-table slot :errorp nil)))))
      (or (find-index class)
          (and include-superclasses
               (loop for superclass in (class-precedence-list (find-class class))
                     thereis (find-index (class-name superclass))))
          (and errorp
               (simple-rucksack-error
                "Can't find slot index for slot ~S of class ~S in ~S."
                slot
                class
                rucksack))))))
Source Context