Skip to content

TBABoolean

The class of boolean attributes

Unit: BoldAttributes

Declaration

TBABoolean = class(TBAValueSet)

Hierarchy

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

Description

This attribute type can store a boolean value. It has three different string representations:

  • brDefault (1) - 'N', 'Y'
  • 2 - 'F', 'T'
  • 3 - 'False', 'True'

If you want other string-representations, the easiest way is to subclass TBABoolean, and override the GetStringRepresentation-method

Properties

Name Summary Notes
AsBoolean

AsBoolean

property AsBoolean: Boolean;

This property is the actual delphi-representation of the boolean value stored in the attribute.

Methods

Name Summary Notes
AssignContentValue protected, override
GetAsBoolean Getter for the AsBoolean property protected
GetAsVariant Returns the data state as a variant override
GetValues Returns the TBAValueSetValueList for the Boolean property protected, override
ProxyClass protected, override
ProxyInterface override
SetAsBoolean Set method for AsBoolean protected
SetAsVariant Sets the native value from a variant override

AssignContentValue

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

GetAsBoolean

function GetAsBoolean: Boolean;

GetAsBoolean checks if reading is permitted using CanRead before returning the value held by the attribute.

GetAsVariant

function GetAsVariant: Variant; override; See also Ancestor Method

GetAsVariant simply returns the AsBoolean result as a variant.

GetValues

function GetValues: TBAValueSetValueList; override; See also Ancestor Method

Since TBABoolean is implemented as a subclass of TBAValueSet it is related to a list of valid values. This method returns the list. The list is a singleton, not created until accessed and automatically destroyed on termination.

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

SetAsBoolean

procedure SetAsBoolean(Value: Boolean);

SetAsBoolean is the set method for the AsBoolean property. It ensures the value can be set prior to altering it.

SetAsVariant

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

SetAsVariant sets the AsBoolean property with the variant passed as parameter.


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.