![]() | ![]() | ![]() | link-setf | ![]() |
| link-slot-place | [Macro] |
Purpose
Set link-slot-place to be precisely
Package :gbbopen
Module :gbbopen-core
Arguments and values
link-slot-place | A form which is suitable for use as a generalized reference to a link slot | |
unit-instance-or-instances | A unit instance, a link-pointer object, or a list of unit instances and link-pointer objects |
Returns
The supplied unit-instance-or-instances.
Events
An unlink-event
is signaled for:
link-event
is signaled for:
Description
Any existing links in
The order of the specified :sort-function
See also
link-instance-of
linkf
standard-link-pointer
unlinkf
unlinkf-all
Examples
Set the supporting-hyps
hyp
unit instance to the unit instances in
supporting-hyps
> (link-setf (supporting-hyps-of unit-instance) supporting-hyps) #<hyp 231 (1488 7405) 0.63 [0..8]> >Note that, when a link pointer to
hyp
231 is already present in
a link slot, adding a link-pointer-object link to that same hyp
unit instance replaces the existing link pointer:
> (supporting-hyps-of unit-instance) (#<hyp 231 (1488 7405) 0.63 [0..8]>) > (link-setf (supporting-hyps-of unit-instance) (make-instance 'link-ptr-with-value :link-instance support-hyp :value 0.9)) #<link-ptr-with-value #<hyp 231 (1488 7405) 0.63 [0..8]> > (supporting-hyps-of unit-instance) (#<link-ptr-with-value #<hyp 231 (1488 7405) 0.63 [0..8]>) > (value-of *) 0.9 >Replace the existing link-pointer-object pointer with one that has a different
value
:
> (supporting-hyps-of unit-instance) (#<link-ptr-with-value #<hyp 231 (1488 7405) 0.63 [0..8]>) > (link-setf (supporting-hyps-of unit-instance) (make-instance 'link-ptr-with-value :link-instance support-hyp :value 0.94)) #<link-ptr-with-value #<hyp 231 (1488 7405) 0.63 [0..8]> > (supporting-hyps-of unit-instance) (#<link-ptr-with-value #<hyp 231 (1488 7405) 0.63 [0..8]>) > (value-of *) 0.94 >Of course, a
value
change can also be done directly in
an existing link-pointer object:
> (supporting-hyps-of unit-instance) (#<link-ptr-with-value #<hyp 231 (1488 7405) 0.63 [0..8]>) > (setf (value-of *) 0.96) 0.96 > (supporting-hyps-of unit-instance) (#<link-ptr-with-value #<hyp 231 (1488 7405) 0.63 [0..8]>) > (value-of *) 0.96 >
Note
The form (link-setf
link-slot-place nil)
(unlinkf-all
link-slot-place)
The GBBopen Project
![]() | ![]() | ![]() | link-setf | ![]() |