effective-link-definitionLinkslinkflink-instance-ofGoTo Top

link-instance-of   object => instance[Generic Accessor]

Purpose
Return the unit instance in an object that can be used as a link pointer.

Setf syntax

(setf (link-instance-of   object) unit-instance) => unit-instance

Method signatures

link-instance-of  (object deleted/non-deleted-unit-instance) => object
link-instance-of  (object standard-link-pointer) => unit-instance

Package   :gbbopen

Module   :gbbopen-core

Arguments and values

object     An object
unit-instance     A unit instance

Returns
The link pointer unit-instance.

Description
The link-instance-of method on a unit instance returns its argument unit-instance object.

See also
    linkf
    link-setf
    standard-link-pointer
    unlinkf

Example
Define a link-pointer object class that can be used to associate a value with a link pointer:

  (define-class link-ptr-with-value (standard-link-pointer)
     ((value :initform nil)))
and an informative print-instance-slots method:
  (defmethod print-instance-slots ((obj link-ptr-with-value) stream)
    (call-next-method)
    (print-instance-slot-value obj 'value stream))


The GBBopen Project


effective-link-definitionLinkslinkflink-instance-ofGoTo Top