![]() | ![]() | ![]() | check-all-instance-links | ![]() |
| &optional silentp errorp | [Function] |
Purpose
Check the link slots of all unit instances for
bi-directional consistency.
Package :gbbopen
Module :gbbopen-core
Arguments and values
silentp | A generalized boolean (default is nil )
| |
errorp | A generalized boolean (default is nil )
| |
problem-count | An integer |
Returns
The number of inconsistent links encountered.
Description
GBBopen automatically maintains bidirectional relationship
consistency all link-slot definitions are consistent. (Definitional
consistency can be checked with
sort
without a protective copy-list
) can break this consistency.
If a link inconsistency is found, details of the inconsistency
are printed to *standard-output*
If silentp is true, warning and summary messages are not printed. If
silentp is nil
and errorp is true, a correctable error is
signaled if a link inconsistency is found.
See also
check-link-definitions
Examples
Check that all instance links are consistent:
> (check-all-instance-links) ;; All instance links are consistent. 0 >Check again, silently:
> (check-all-instance-links 't) 0 >
The result of checking when something has set the next-location
location
20 to nil
:
> (check-all-instance-links) Warning: Inverse link back to #<location 21 (32 37)> (link-slot previous-location) from #<location 20 (28 28)> is missing in link-slot next-location ;; 1 problem was found. 1 >
Repeat, but with errorp true to prompt for automated repair of each problem:
> (check-all-instance-links nil 't) Error: Inverse link back to #<location 21 (32 37)> (link-slot previous-location) from #<location 20 (28 28)> is missing in link-slot next-location Restart actions (select using :c n): 0: Fix the inconsistency. >> :c 0 ;; Link to #<location 21 (32 37)> added. ;; 1 problem was found. ;; 1 repair was made. 1 > (check-all-instance-links) ;; All instance links are consistent. 0 >
The GBBopen Project
![]() | ![]() | ![]() | check-all-instance-links | ![]() |