ReferenceAccessor
- class ReferenceAccessor[M]
-
Children
Members defined in
ReferenceAccessor(4 members)
RReturns the referenced
Element. This may returnNone, e.g. when reference resolution failed, although in most such cases a placeholder element will be returned instead.
RReturns
Trueif this reference can be modified, that is the owningRelationshipis an owned member of aNamespace. Callingsetmethods whenmodifiable == Falsewill raiseValueError.
try_setbut instead raisesValueErrorif this reference cannot be modified.
Try changing the referenced
element. ReturnsNoneif this reference cannot be modified, otherwise returnselementargument. Attributes
- property element: syside.Element | None
Returns the referenced
Element. This may returnNone, e.g. when reference resolution failed, although in most such cases a placeholder element will be returned instead.
- property modifiable: bool
Returns
Trueif this reference can be modified, that is the owningRelationshipis an owned member of aNamespace. Callingsetmethods whenmodifiable == Falsewill raiseValueError.
Methods
- set(element: syside.M, name: syside.NameID = ...) syside.M
try_setbut instead raisesValueErrorif this reference cannot be modified.
- try_set(element: syside.M, name: syside.NameID = ...) syside.M | None
Try changing the referenced
element. ReturnsNoneif this reference cannot be modified, otherwise returnselementargument.