mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 09:29:25 +02:00
+ add type helpers for the remaining Boolean types (QWordBool and Boolean{8,16,32,64})
This commit is contained in:
parent
0f1c4b4db8
commit
e65b822a0c
@ -162,6 +162,22 @@ type
|
||||
{$i syshelpersbh.inc}
|
||||
end;
|
||||
|
||||
TBoolean8SysHelper = type helper(TBoolean8Helper) for Boolean8
|
||||
{$i syshelpersbh.inc}
|
||||
end;
|
||||
|
||||
TBoolean16SysHelper = type helper(TBoolean16Helper) for Boolean16
|
||||
{$i syshelpersbh.inc}
|
||||
end;
|
||||
|
||||
TBoolean32SysHelper = type helper(TBoolean32Helper) for Boolean32
|
||||
{$i syshelpersbh.inc}
|
||||
end;
|
||||
|
||||
TBoolean64SysHelper = type helper(TBoolean64Helper) for Boolean64
|
||||
{$i syshelpersbh.inc}
|
||||
end;
|
||||
|
||||
TByteBoolSysHelper = type helper(TByteBoolHelper) for ByteBool
|
||||
{$i syshelpersbh.inc}
|
||||
end;
|
||||
@ -174,6 +190,10 @@ type
|
||||
{$i syshelpersbh.inc}
|
||||
end;
|
||||
|
||||
TQWordBoolSysHelper = type helper(TQWordBoolHelper) for QWordBool
|
||||
{$i syshelpersbh.inc}
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
@ -255,6 +275,38 @@ end;
|
||||
{$define TBOOLTYPE:=Boolean}
|
||||
{$i syshelpersb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TBoolean8SysHelper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TBoolean8SysHelper}
|
||||
{$define TBOOLTYPE:=Boolean8}
|
||||
{$i syshelpersb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TBoolean16SysHelper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TBoolean16SysHelper}
|
||||
{$define TBOOLTYPE:=Boolean16}
|
||||
{$i syshelpersb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TBoolean32SysHelper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TBoolean32SysHelper}
|
||||
{$define TBOOLTYPE:=Boolean32}
|
||||
{$i syshelpersb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TBoolean64SysHelper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TBoolean64SysHelper}
|
||||
{$define TBOOLTYPE:=Boolean64}
|
||||
{$i syshelpersb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TByteBoolSysHelper
|
||||
---------------------------------------------------------------------}
|
||||
@ -280,6 +332,14 @@ end;
|
||||
{$define TBOOLTYPE:=LongBool}
|
||||
{$i syshelpersb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TLongBoolSysHelper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TQWordBoolSysHelper}
|
||||
{$define TBOOLTYPE:=QWordBool}
|
||||
{$i syshelpersb.inc}
|
||||
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TByteSysHelper
|
||||
|
@ -1773,6 +1773,38 @@ end;
|
||||
{$define TBOOLTYPE:=Boolean}
|
||||
{$i syshelpb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TBoolean8Helper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TBoolean8Helper}
|
||||
{$define TBOOLTYPE:=Boolean8}
|
||||
{$i syshelpb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TBoolean16Helper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TBoolean16Helper}
|
||||
{$define TBOOLTYPE:=Boolean16}
|
||||
{$i syshelpb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TBoolean32Helper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TBoolean32Helper}
|
||||
{$define TBOOLTYPE:=Boolean32}
|
||||
{$i syshelpb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TBoolean64Helper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TBoolean64Helper}
|
||||
{$define TBOOLTYPE:=Boolean64}
|
||||
{$i syshelpb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TByteBoolHelper
|
||||
---------------------------------------------------------------------}
|
||||
@ -1798,3 +1830,11 @@ end;
|
||||
{$define TBOOLTYPE:=LongBool}
|
||||
{$i syshelpb.inc}
|
||||
|
||||
{ ---------------------------------------------------------------------
|
||||
TQWordBoolHelper
|
||||
---------------------------------------------------------------------}
|
||||
|
||||
{$define TBOOLHELPER:=TQWordBoolHelper}
|
||||
{$define TBOOLTYPE:=QWordBool}
|
||||
{$i syshelpb.inc}
|
||||
|
||||
|
@ -1117,6 +1117,50 @@ Type
|
||||
Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
||||
end;
|
||||
|
||||
TBoolean8Helper = Type Helper for Boolean8
|
||||
public
|
||||
Class Function Parse(const S: string): Boolean; inline; static;
|
||||
Class Function Size: Integer; 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;
|
||||
Public
|
||||
Function ToInteger: Integer; inline;
|
||||
Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
||||
end;
|
||||
|
||||
TBoolean16Helper = Type Helper for Boolean16
|
||||
public
|
||||
Class Function Parse(const S: string): Boolean; inline; static;
|
||||
Class Function Size: Integer; 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;
|
||||
Public
|
||||
Function ToInteger: Integer; inline;
|
||||
Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
||||
end;
|
||||
|
||||
TBoolean32Helper = Type Helper for Boolean32
|
||||
public
|
||||
Class Function Parse(const S: string): Boolean; inline; static;
|
||||
Class Function Size: Integer; 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;
|
||||
Public
|
||||
Function ToInteger: Integer; inline;
|
||||
Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
||||
end;
|
||||
|
||||
TBoolean64Helper = Type Helper for Boolean64
|
||||
public
|
||||
Class Function Parse(const S: string): Boolean; inline; static;
|
||||
Class Function Size: Integer; 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;
|
||||
Public
|
||||
Function ToInteger: Integer; inline;
|
||||
Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
||||
end;
|
||||
|
||||
TByteBoolHelper = Type Helper for ByteBool
|
||||
public
|
||||
Class Function Parse(const S: string): Boolean; inline; static;
|
||||
@ -1149,3 +1193,14 @@ Type
|
||||
Function ToInteger: Integer; inline;
|
||||
Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
||||
end;
|
||||
|
||||
TQWordBoolHelper = Type Helper for QWordBool
|
||||
public
|
||||
Class Function Parse(const S: string): Boolean; inline; static;
|
||||
Class Function Size: Integer; 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;
|
||||
public
|
||||
Function ToInteger: Integer; inline;
|
||||
Function ToString(UseBoolStrs: TUseBoolStrs = TUseBoolStrs.False): string; overload; inline;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user