TBAConstraint¶
Unit: BoldAttributes
Declaration¶
Hierarchy¶
- TObject
TBoldMemoryManagedObjectTBoldFlaggedObject- TBoldSubscribableObject
- TBoldElement
- TBoldDomainElement
- TBoldMember
- TBoldAttribute
- TBAValueSet
- TBABoolean
- TBAConstraint
Description¶
Constraints that are specified in the model can be evaluated and the result is an instance of TBAConstraint. This class inherits from TBABoolean, so it will have a truth-value corresponding to whether the constrain holds or is broken.
To indicate to a user what constraint is actually broken, each constraint has a number of string reperesentations:
- 1: (brDefault) N/Y
- 2: False/True
- 3: F/T
- 10: the model name of the constraint
- 11: the description of the constraint
- 12: the expression of the constraint
- 13: the DisplayName of the element that the constraint belongs to
- 14: the string representation of the element that the constraint belongs to
Given an object that has constraints, the following ocl expressions are useful:
anObject.constraints: all constraints of the objectanObject.constraints->select(c|**not** c): all broken constraints of the objectanObject.constraints->select(c|**not** c)->isEmpty: true if the object has no broken constraints
Properties¶
| Name | Summary | Notes |
|---|---|---|
| Constraint | read-only | |
| OwningElement | The element that has the constraint | read-only |
Constraint¶
OwningElement¶
Normally this will be aTBoldObject, but could be any element that can have constraints.
Methods¶
| Name | Summary | Notes |
|---|---|---|
| Assign | override | |
| DefaultSubscribe | override | |
| Destroy | override | |
| GetContentAsInteger | protected, override | |
| GetStringRepresentation | protected, override | |
| Initialize | ||
| InitializeMember | protected, override | |
| SubscribeToStringRepresentation | override |
Assign¶
DefaultSubscribe¶
procedure DefaultSubscribe(Subscriber: TBoldSubscriber; RequestedEvent: TBoldEvent = breReEvaluate); override; See also Ancestor Method
Destroy¶
GetContentAsInteger¶
GetStringRepresentation¶
function GetStringRepresentation(Representation: TBoldRepresentation): string; override; See also Ancestor Method
Initialize¶
InitializeMember¶
procedure InitializeMember(OwningElement: TBoldDomainElement; ElementTypeInfo: TBoldElementTypeInfo); override; See also Ancestor Method
SubscribeToStringRepresentation¶
procedure SubscribeToStringRepresentation(Representation: TBoldRepresentation; Subscriber: TBoldSubscriber; RequestedEvent: TBoldEvent = breReEvaluate); override; See also Ancestor Method
Generated from the Bold 4.0 help (Help/BfD.chm) by Tools/chm2mkdocs.py; member lists reflect Bold 4.0, see the source for members added since.