DerivedRelation object | relations.t[412]

A DerivedRelation is one that doesn't maintain its own table of what it related to what, but works out what is related to what on the basis of some other relation(s) (e.g. a sibling relation might work by testing for common parents).

REQUIRES THE RELATIONS EXTENSION

`DerivedRelation : Relation`

Superclass Tree (in declaration order)

`DerivedRelation`
`Relation`
`PreinitObject`
`ModuleExecObject`
`object`

Summary of Properties

``

Inherited from `Relation` :
`name reciprocal relationType relTab reverseName`

Inherited from `PreinitObject` :
`execBeforeMe reverseGlobalSymbols`

Inherited from `ModuleExecObject` :
`execAfterMe hasInitialized_ isDoingExec_ isExecuted_`

Summary of Methods

`addRelation isInverselyRelated isRelated listKeys relatedTo removeRelation`

Inherited from `Relation` :
`inverselyRelatedTo makeUnique`

``

Inherited from `ModuleExecObject` :
`_execute classExec execute`

Properties

(none)

Methods

`addRelation (objs)`OVERRIDDEN | `relations.t[489]`

By default we don't permit the direct addition of relationships via this relation, since this is a relation dependent upon external conditions.

`isInverselyRelated (a, b)`OVERRIDDEN | `relations.t[444]`

Game code must override this method to determine whether a is inversely related to b unless it either overrides inverselyRelatedTo() to return a list of items to which a is inversely related or the relation is a reciprocal one.

`isRelated (a, b)`OVERRIDDEN | `relations.t[466]`

If relatedTo has not been overriden to provide a list, instances need to override isRelated to provide a method that returns true or nil according to whether this DerivedRelationship holds between a and b.

`listKeys ( )`OVERRIDDEN | `relations.t[511]`

We don't have any entries listed in the relTable, but there may be another way of building a list of the key values to which this DerivedRelalation applies; if so, particular instances can override this method to supply it here.

`relatedTo (a)`OVERRIDDEN | `relations.t[419]`

Especially if listKeys() hasn't been defined on this DerivedRelation, instances may need to override to provide a method that returns a list of items related to a via this relationship, on the basis of whatever criteria are appropriate.

`removeRelation (objs)`OVERRIDDEN | `relations.t[500]`

By default we don't permit the direct removal of relationships via this relation, since this is a relation dependent upon external conditions.

Adv3Lite Library Reference Manual
Generated on 25/04/2024 from adv3Lite version 2.0