Skip to content

TBAValueSet

Subclass TBAValueSet to create enumeration type attributes.

Unit: BoldAttributes

Declaration

TBAValueSet = class(TBoldAttribute)

Hierarchy

  1. TObject
  2. TBoldMemoryManagedObject
  3. TBoldFlaggedObject
  4. TBoldSubscribableObject
  5. TBoldElement
  6. TBoldDomainElement
  7. TBoldMember
  8. TBoldAttribute
  9. TBAValueSet
  10. Direct subclasses
  11. TBABoolean
  12. TBALanguage
  13. TBAMLValueSet

Description

Subclass TBAValueSet to create enumeration type attributes. The attribute wizard (accessible through the "Bold | Bold Attribute Wizard" menu) is the easiest way to create custom attributes.

Properties

Name Summary Notes
AsInteger
ContentAsInteger protected
Values read-only

AsInteger

property AsInteger: Integer;

ContentAsInteger

property ContentAsInteger: Integer;

Values

property Values: TBAValueSetValueList;

Methods

Name Summary Notes
Assign override
AssignContentValue protected, override
AssignValue override
CanSetValue
CompareToAs override
CompareToEnumLiteral Compares the valueset to an enum literal string virtual
GetAsVariant override
GetContentAsInteger protected, virtual
GetStringRepresentation protected, override
GetValues protected, abstract
InitializeMember protected, override
MaySetValue Override to affect the result of CanSetValue . protected, virtual
ProxyClass protected, override
ProxyInterface override
SetAsVariant override
SetEmptyValue override
SetStringRepresentation protected, override
ValidateCharacter override
ValidateString override

Assign

procedure Assign(Source: TBoldElement); override; See also Ancestor Method

AssignContentValue

procedure AssignContentValue(Source: IBoldValue); override; See also Ancestor Method

AssignValue

procedure AssignValue(Source: IBoldValue); override; See also Ancestor Method

CanSetValue

function CanSetValue(NewValue: TBAValueSetValue; Subscriber: TBoldSubscriber): Boolean;

Use this function to test if it is allowed to set the attribute to a specific value.

If a subscriber is sent to the function, this subscriber will be notified if the conditions have changed (so that an illegal value is now legal). It is OK to send a nilpointer instead.

CompareToAs

function CompareToAs(CompType: TBoldCompareType; BoldElement: TBoldElement): Integer; override; See also Ancestor Method

CompareToEnumLiteral

function CompareToEnumLiteral(const str: String): Boolean; virtual;

This function is used internally by the OCL-evaluator

GetAsVariant

function GetAsVariant: Variant; override; See also Ancestor Method

GetContentAsInteger

function GetContentAsInteger: Integer; virtual;

GetStringRepresentation

function GetStringRepresentation(Representation: TBoldRepresentation): string; override; See also Ancestor Method

GetValues

function GetValues: TBAValueSetValueList; virtual; abstract;

InitializeMember

procedure InitializeMember(OwningElement: TBoldDomainElement; ElementTypeInfo: TBoldElementTypeInfo); override; See also Ancestor Method

MaySetValue

function MaySetValue(NewValue: TBAValueSetValue; Subscriber: TBoldSubscriber): Boolean; virtual;

A subclass of TBAValueSet may override this method to prohibit setting the attribute to a specific value. If the result value is false, the setting will be aborted. If it is true, there may still be other reasons why the changing of the value is not allowed.

ProxyClass

function ProxyClass: TBoldMember_ProxyClass; override; See also Ancestor Method

ProxyInterface

function ProxyInterface(const IId: TGUID; Mode: TBoldDomainElementProxyMode; out Obj): Boolean; override; See also Ancestor Method

SetAsVariant

procedure SetAsVariant(const Value: Variant); override; See also Ancestor Method

SetEmptyValue

procedure SetEmptyValue; override; See also Ancestor Method

SetStringRepresentation

procedure SetStringRepresentation(Representation: TBoldRepresentation; Value: string); override; See also Ancestor Method

ValidateCharacter

function ValidateCharacter(C: AnsiChar; Representation: TBoldRepresentation): Boolean; override; See also Ancestor Method

ValidateString

function ValidateString(Value: string; Representation: TBoldRepresentation): Boolean; 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.