check-for-deleted-instanceGBBopen Coreclass-instances-countcheck-instance-locatorsGoTo Top

check-instance-locators   unit-instance[Function]

Signal an error if the locators on any space-instance are inconsistent with the dimension values of the supplied unit instance.

Package   :gbbopen

Module   :gbbopen-core

Arguments and values

unit-instance     A unit instance

Changes to slot values that affect a unit instance's dimension values must be indicated to GBBopen using the with-changing-dimension-values macro. Otherwise, locators for the unit instance will not be updated to reflect the new dimension values, resulting in the inability to retrieve the instance where it should be located on a space instance and removed or deleted instances incorrectly retained on a space instance due to the inconsistent locators. Check-instance-locators can be used as a debugging aid during development to check for inconsistent locators.

See also

Check the locators of all unit instances that are stored on any space instance:

  > (map-instances-on-space-instances #'check-instance-locators t t)
Intentionally create inconsistent locators for a hyp unit instance by changing its location without using with-changing-dimension-values. Then check its locators:
  > (defparameter *hyp* (find-instance-by-name 419 'hyp))
  > *hyp*
  #<hyp 419 (1835 4791) 0.85 [5..35]>
  >(check-instance-locators *hyp*)
  > (setf (location-of *hyp*) '(2000 2000))
  (2000 2000)
  > (check-instance-locators *hyp*)
  Error: Instance #<hyp 419 (2000 2000) 0.85 [5..35]> is missing (bucket [21,21]) 
         in #<2d-Uniform-Buckets (bb hyps) (hyp+) (x y) 8>

The GBBopen Project

check-for-deleted-instanceGBBopen Coreclass-instances-countcheck-instance-locatorsGoTo Top