|
@@ -1067,15 +1067,19 @@ Type
|
|
Function TestBit(const Index:TNativeUIntBitIndex) :Boolean; inline;
|
|
Function TestBit(const Index:TNativeUIntBitIndex) :Boolean; inline;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+{$SCOPEDENUMS ON}
|
|
|
|
+ TUseBoolStrs = (False,True);
|
|
|
|
+{$SCOPEDENUMS OFF}
|
|
|
|
+
|
|
TBooleanHelper = Type Helper for Boolean
|
|
TBooleanHelper = Type Helper for Boolean
|
|
public
|
|
public
|
|
Class Function Parse(const S: string): Boolean; inline; static;
|
|
Class Function Parse(const S: string): Boolean; inline; static;
|
|
Class Function Size: Integer; inline; static;
|
|
Class Function Size: Integer; inline; static;
|
|
- Class Function ToString(const AValue: Boolean; UseBoolStrs: Boolean = false): string; overload; inline; static;
|
|
|
|
|
|
+ Class Function ToString(const AValue: Boolean; UseBoolStrs: TUseBoolStrs = TUseBoolStrs.false): string; overload; inline; static;
|
|
Class Function TryToParse(const S: string; out AValue: Boolean): Boolean; inline; static;
|
|
Class Function TryToParse(const S: string; out AValue: Boolean): Boolean; inline; static;
|
|
Public
|
|
Public
|
|
Function ToInteger: Integer; inline;
|
|
Function ToInteger: Integer; inline;
|
|
- Function ToString(UseBoolStrs: Boolean = False): string; overload; inline;
|
|
|
|
|
|
+ Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
|
end;
|
|
end;
|
|
|
|
|
|
TByteBoolHelper = Type Helper for ByteBool
|
|
TByteBoolHelper = Type Helper for ByteBool
|
|
@@ -7964,10 +7968,10 @@ begin
|
|
Result:=1;
|
|
Result:=1;
|
|
end;
|
|
end;
|
|
|
|
|
|
-Class Function TBooleanHelper.ToString(const AValue: Boolean; UseBoolStrs: Boolean = False): string; overload; inline;
|
|
|
|
|
|
+Class Function TBooleanHelper.ToString(const AValue: Boolean; UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
|
|
|
|
|
begin
|
|
begin
|
|
- Result:=BoolToStr(AValue,UseBoolStrs);
|
|
|
|
|
|
+ Result:=BoolToStr(AValue,UseBoolStrs=TUseBoolStrs.True);
|
|
end;
|
|
end;
|
|
|
|
|
|
Class Function TBooleanHelper.TryToParse(const S: string; out AValue: Boolean): Boolean; inline;
|
|
Class Function TBooleanHelper.TryToParse(const S: string; out AValue: Boolean): Boolean; inline;
|
|
@@ -7982,10 +7986,10 @@ begin
|
|
Result:=Integer(Self);
|
|
Result:=Integer(Self);
|
|
end;
|
|
end;
|
|
|
|
|
|
-Function TBooleanHelper.ToString(UseBoolStrs: Boolean= False): string; overload; inline;
|
|
|
|
|
|
+Function TBooleanHelper.ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
|
|
|
|
|
begin
|
|
begin
|
|
- Result:=BoolToStr(Self,UseBoolStrs);
|
|
|
|
|
|
+ Result:=BoolToStr(Self,UseBoolStrs=TUseBoolStrs.True);
|
|
end;
|
|
end;
|
|
|
|
|
|
{ ---------------------------------------------------------------------
|
|
{ ---------------------------------------------------------------------
|