relation

Class summary
relatable-class
relation-class inherits from relatable-class
Structure summary
relatable-struct
relation-struct includes relatable-struct
Method summary
copy-object-content (source relatable-class) (target relatable-class)
copy-object-content (source relatable-struct) (target relatable-struct)
copy-object-content (source relation-class) (target relation-class)
copy-object-content (source relation-struct) (target relation-struct)
eq-role role-1 role-2
initialize-instance (relation relation-class) &key relatees &allow-other-keys
print-object (relatable relatable-class) stream
print-object (relatable relatable-struct) stream
print-object (relation relation-class) stream
print-object (relation relation-struct) stream
relatees relation-class
relaters relatable-class
unrelate obj
Function summary
add-relatee relation role relatable
add-relater relatable role relation
copy-relatable-content source target
copy-relatable-struct relatable-struct
copy-relation-content source target
copy-relation-struct relation-struct
find-relatee relation role
full-copy-object obj
get-relatee relation role
get-relaters relatable role &optional typespec
make-relatable-struct &key relaters copy
make-relation relatees
print-relatable relatable stream
print-relation relation stream
relatable-struct-copy relatable-struct
relatable-struct-p object
relatable-struct-relaters relatable-struct
relatablep obj
relation-struct-p object
relation-struct-relatees relation-struct
remove-relatee relation relatable
remove-relatee-by-role relation role
remove-relater relatable relation &key role
unrelate-relatable relatable
unrelate-relation relation
relatable-class    [Class]

Mixin super-class for classes of which instances can participate in relations.

relaters    [Slot]

The associative list ((role . relation*)*) that contains the relations that relate this relatable, organized by the respective roles the relatables assume in the relations.

copy    [Slot]

When a relatable is copied using copy-object, then the copy is temporarily assigned to this slot. This copy can then be used to re-link the copy of the relations in the second pass of the copying.

relaters   relatable-class  [Generic function]

Returns the relaters of the specified relatable-class

relation-class   inherits from relatable-class  [Class]

A relation relates one or more relatables, each one under a unique role. Example instantiation: (make-instance 'relation :relatees `((parent ,a-parent) (child ,a-child))

:relatees    [Initarg]
relatees    [Slot]

The associative list ((role . relatable)*) that contains the relatees related by this relation, organized by their roles.

relatees   relation-class  [Generic function]

Returns the relatees of the specified relation-class

relatable-struct    [Structure]
relatable-struct-copy   relatable-struct  [Function]

Returns and (with setf) changes the copy of the specified relatable-struct

relatable-struct-relaters   relatable-struct  [Function]

Returns and (with setf) changes the relaters of the specified relatable-struct

make-relatable-struct   &key relaters copy  [Function]

Returns a newly created relatable-struct.

copy-relatable-struct   relatable-struct  [Function]

Returns a copy of the specified relatable-struct.

relatable-struct-p   object  [Function]

Returns T if the specified object is of type relatable-struct.

relation-struct    [Structure]
relation-struct-relatees   relation-struct  [Function]

Returns and (with setf) changes the relatees of the specified relation-struct

make-relation   relatees  [Function]

Returns a newly created relation-struct.

copy-relation-struct   relation-struct  [Function]

Returns a copy of the specified relation-struct.

relation-struct-p   object  [Function]

Returns T if the specified object is of type relation-struct.

role   (quote symbol)  [Type]
relatable   (quote (or relatable-class relatable-struct))  [Type]
relation   (quote (or relation-class relation-struct))  [Type]
*partially-copied-relations*    [Variable]
eq-role   role-1 role-2  [Generic function]

Role equality function, can be specialized for special roles.

unrelate   obj  [Generic function]
print-object   (relatable relatable-class) stream  [Method]
print-object   (relatable relatable-struct) stream  [Method]
initialize-instance   (relation relation-class) &key relatees &allow-other-keys  [After method]
print-object   (relation relation-class) stream  [Method]
print-object   (relation relation-struct) stream  [Method]
copy-object-content   (source relatable-class) (target relatable-class)  [Method]
copy-object-content   (source relatable-struct) (target relatable-struct)  [Method]
copy-object-content   (source relation-class) (target relation-class)  [Method]
copy-object-content   (source relation-struct) (target relation-struct)  [Method]
relatablep   obj  [Function]
print-relatable   relatable stream  [Function]
print-relation   relation stream  [Function]
find-relatee   relation role  [Function]

Returns the relatee for the given role.

get-relatee   relation role  [Function]
add-relatee   relation role relatable  [Function]

Add a relatable under the given role.

remove-relatee   relation relatable  [Function]

Remove the given relatable from the given relation.

remove-relatee-by-role   relation role  [Function]

Remove a relatee from the given relation, where the to be removed relatable participates in the relation under the given role.

unrelate-relation   relation  [Function]
unrelate-relatable   relatable  [Function]
get-relaters   relatable role &optional typespec  [Function]

Return the relations that relate the given relatable. If a role is given then only those relations that relate this relatable under the given role are returned. If a typespec is given than only those relations that are of that given type are returned. A role and a typespec can be combined.

add-relater   relatable role relation  [Function]

Add the given relation to the collection of relations that relate this relatable. Warning: this method should typically not be called by users. Users should typically call add-relatee, which calls add-relater.

remove-relater   relatable relation &key role  [Function]

Removes the given relation from the collection of relations that relate this relatable. A role can be given when the relatable is related multiple times by the same relation under different roles.

copy-relatable-content   source target  [Function]
copy-relation-content   source target  [Function]
full-copy-object   obj  [Function]

Initiates three-pass copy from obj down, and returns the copy.