syshelp.inc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. {%mainunit syshelpers.pp}
  2. { ---------------------------------------------------------------------
  3. TGUIDHelper
  4. ---------------------------------------------------------------------}
  5. Procedure NotImplemented(S : String);
  6. begin
  7. Raise Exception.Create('Not yet implemented : '+S);
  8. end;
  9. Class function TGUIDHelper.Create(const Data; BigEndian: Boolean): TGUID; overload; static;
  10. Const
  11. GUIDSize = SizeOf(TGUID);
  12. Var
  13. B : Array[1..GUIDSize] of Byte;
  14. begin
  15. Move(Data,B,GUIDSize);
  16. Result:=Create(B,0,BigEndian);
  17. end;
  18. class function TGUIDHelper.Create(const Data: array of Byte; AStartIndex: Cardinal; BigEndian: Boolean): TGUID; overload; static;
  19. Var
  20. A : Cardinal;
  21. B,C : Word;
  22. begin
  23. if ((System.Length(Data)-AStartIndex)<16) then
  24. raise EArgumentException.CreateFmt('The length of a GUID array must be at least %d',[]);
  25. Move(Data[AStartIndex],A,SizeOf(Cardinal));
  26. Move(Data[AStartIndex+4],B,SizeOf(Word));
  27. Move(Data[AStartIndex+6],C,SizeOf(Word));
  28. // Writeln('BigEndian : ',BigEndian,', CPU bigendian : ',(CPUendian=TEndian.Big));
  29. if BigEndian<>(CPUendian=TEndian.Big) then
  30. begin
  31. // Writeln('Swapping');
  32. A:=SwapEndian(A);
  33. B:=SwapEndian(B);
  34. C:=SwapEndian(C);
  35. end;
  36. Result:=Create(A,B,C,Data[AStartIndex+8],Data[AStartIndex+9],Data[AStartIndex+10],Data[AStartIndex+11],Data[AStartIndex+12],Data[AStartIndex+13],Data[AStartIndex+14],Data[AStartIndex+15]);
  37. end;
  38. Class Function TGUIDHelper.Create(const Data; DataEndian: TEndian = CPUEndian): TGUID; overload; static; inline;
  39. begin
  40. Result:=Create(Data,DataEndian=TEndian.Big)
  41. end;
  42. Class Function TGUIDHelper.Create(const B: TBytes; DataEndian: TEndian = CPUEndian): TGUID; overload; static; inline;
  43. begin
  44. Result:=Create(B,0,DataEndian);
  45. end;
  46. Class Function TGUIDHelper.Create(const B: TBytes; AStartIndex: Cardinal; DataEndian: TEndian = CPUEndian): TGUID; overload; static;
  47. begin
  48. if ((System.Length(B)-AStartIndex)<16) then
  49. raise EArgumentException.CreateFmt('The length of a GUID array must be at least %d',[]);
  50. Result:=Create(B,AStartIndex,DataEndian=TEndian.Big);
  51. end;
  52. Class Function TGUIDHelper.Create(const S: string): TGUID; overload; static;
  53. begin
  54. Result:=StringToGUID(S);
  55. end;
  56. Class Function TGUIDHelper.Create(A: Integer; B: SmallInt; C: SmallInt; const D: TBytes): TGUID; overload; static;
  57. begin
  58. if (System.Length(D)<>8) then
  59. raise EArgumentException.CreateFmt('The length of a GUID array must be %d',[]);
  60. Result:=Create(Cardinal(A),Word(B),Word(C),D[0],D[1],D[2],D[3],D[4],D[5],D[6],D[7]);
  61. end;
  62. Class Function TGUIDHelper.Create(A: Integer; B: SmallInt; C: SmallInt; D, E, F, G, H, I, J, K: Byte): TGUID; overload; static;
  63. begin
  64. Result:=Create(Cardinal(A),Word(B),Word(C),D,E,F,G,H,I,J,K);
  65. end;
  66. Class Function TGUIDHelper.Create(A: Cardinal; B: Word; C: Word; D, E, F, G, H, I, J, K: Byte): TGUID; overload; static;
  67. begin
  68. Result.D1 := Cardinal(A);
  69. Result.D2 := Word(B);
  70. Result.D3 := Word(C);
  71. Result.D4[0] := D;
  72. Result.D4[1] := E;
  73. Result.D4[2] := F;
  74. Result.D4[3] := G;
  75. Result.D4[4] := H;
  76. Result.D4[5] := I;
  77. Result.D4[6] := J;
  78. Result.D4[7] := K;
  79. end;
  80. Class Function TGUIDHelper.NewGuid: TGUID; static;
  81. begin
  82. CreateGUID(Result)
  83. end;
  84. Function TGUIDHelper.ToByteArray(DataEndian: TEndian = CPUEndian): TBytes;
  85. begin
  86. SetLength(Result, 16);
  87. if DataEndian<>CPUEndian then
  88. begin
  89. PCardinal(@Result[0])^ := SwapEndian(D1);
  90. PWord(@Result[4])^ := SwapEndian(D2);
  91. PWord(@Result[6])^ := SwapEndian(D3);
  92. Move(D4, Result[8], 8);
  93. end
  94. else
  95. Move(D1, Result[0], SizeOf(Self));
  96. end;
  97. Function TGUIDHelper.ToString(SkipBrackets : Boolean = False): string;
  98. begin
  99. Result:=GuidToString(Self);
  100. If SkipBrackets then
  101. Result:=Copy(Result,2,Length(Result)-2);
  102. end;
  103. {$define TStringHelper:=TAnsiStringHelper}
  104. {$define TStringChar:=AnsiChar}
  105. {$define TStringType:=AnsiString}
  106. {$define PTStringChar:=PAnsiChar}
  107. {$define TSHStringArray:=TAnsiStringArray}
  108. {$define IS_ANSISTRINGHELPER}
  109. {$i syshelps.inc}
  110. {$undef TStringHelper}
  111. {$undef TStringChar}
  112. {$undef TStringType}
  113. {$undef PTStringChar}
  114. {$undef TSHStringArray}
  115. {$undef IS_ANSISTRINGHELPER}
  116. {$define TStringHelper:=TWideStringHelper}
  117. {$define TStringChar:=WideChar}
  118. {$define TStringType:=WideString}
  119. {$define PTStringChar:=PWideChar}
  120. {$define TSHStringArray:=TWideStringArray}
  121. {$define IS_WIDESTRINGHELPER}
  122. {$i syshelps.inc}
  123. {$undef TStringHelper}
  124. {$undef TStringChar}
  125. {$undef TStringType}
  126. {$undef PTStringChar}
  127. {$undef TSHStringArray}
  128. {$undef IS_WIDESTRINGHELPER}
  129. {$define TStringHelper:=TUnicodeStringHelper}
  130. {$define TStringChar:=UnicodeChar}
  131. {$define TStringType:=UnicodeString}
  132. {$define PTStringChar:=PUnicodeChar}
  133. {$define TSHStringArray:=TUnicodeStringArray}
  134. {$define IS_UNICODESTRINGHELPER}
  135. {$i syshelps.inc}
  136. {$undef TStringHelper}
  137. {$undef TStringChar}
  138. {$undef TStringType}
  139. {$undef PTStringChar}
  140. {$undef TSHStringArray}
  141. {$undef IS_UNICODESTRINGHELPER}
  142. {$define TStringHelper:=TShortStringHelper}
  143. {$define TStringChar:=AnsiChar}
  144. {$define TStringType:=ShortString}
  145. {$define IS_SHORTSTRINGHELPER}
  146. {$define PTStringChar:=PAnsiChar}
  147. {$define TSHStringArray:=TShortStringArray}
  148. {$i syshelps.inc}
  149. {$undef TStringHelper}
  150. {$undef TStringChar}
  151. {$undef TStringType}
  152. {$undef PTStringChar}
  153. {$undef TSHStringArray}
  154. {$undef IS_SHORTSTRINGHELPER}
  155. { ---------------------------------------------------------------------
  156. TCurrencyHelper
  157. ---------------------------------------------------------------------}
  158. function TCurrencyHelper.GetMaxValue: Currency;
  159. begin
  160. Result:=MaxCurrency;
  161. end;
  162. function TCurrencyHelper.GetMinValue: Currency;
  163. begin
  164. Result:=MinCurrency;
  165. end;
  166. function TCurrencyHelper.Ceil: Int64;
  167. begin
  168. Result:=System.Trunc(Self);
  169. if Currency(Result)<Self then
  170. Result:=Result+1;
  171. end;
  172. function TCurrencyHelper.Floor: Int64;
  173. begin
  174. Result:=System.Trunc(Self);
  175. if Currency(Result)>Self then
  176. Result:=Result-1;
  177. end;
  178. function TCurrencyHelper.Frac: Currency;
  179. begin
  180. Result:=System.Frac(Self);
  181. end;
  182. class function TCurrencyHelper.Parse(const S: string; const AFormatSettings: TFormatSettings): Currency;
  183. begin
  184. Result:=StrToCurr(S, AFormatSettings);
  185. end;
  186. class function TCurrencyHelper.Parse(const S: string): Currency;
  187. begin
  188. Result:=StrToCurr(S);
  189. end;
  190. class function TCurrencyHelper.Size: Integer;
  191. begin
  192. Result:=SizeOf(Currency);
  193. end;
  194. function TCurrencyHelper.ToString(const AFormatSettings: TFormatSettings): string;
  195. begin
  196. Result:=CurrToStr(Self, AFormatSettings);
  197. end;
  198. function TCurrencyHelper.ToString: string;
  199. begin
  200. Result:=CurrToStr(Self);
  201. end;
  202. class function TCurrencyHelper.ToString(const Value: Currency; const AFormatSettings: TFormatSettings): string;
  203. begin
  204. Result:=CurrToStr(Value, AFormatSettings);
  205. end;
  206. class function TCurrencyHelper.ToString(const Value: Currency): string;
  207. begin
  208. Result:=CurrToStr(Value);
  209. end;
  210. function TCurrencyHelper.Trunc: Int64;
  211. begin
  212. Result:=System.Trunc(Self);
  213. end;
  214. class function TCurrencyHelper.TryParse(const S: string; out Value: Currency; const AFormatSettings: TFormatSettings): Boolean;
  215. begin
  216. Result:=True;
  217. try
  218. Value:=StrToCurr(S, AFormatSettings);
  219. except
  220. on E: Exception do
  221. Result:=False;
  222. end;
  223. end;
  224. class function TCurrencyHelper.TryParse(const S: string; out Value: Currency): Boolean;
  225. begin
  226. Result:=True;
  227. try
  228. Value:=StrToCurr(S);
  229. except
  230. on E: Exception do
  231. Result:=False;
  232. end;
  233. end;
  234. { ---------------------------------------------------------------------
  235. TSingleHelper
  236. ---------------------------------------------------------------------}
  237. {$MACRO ON}
  238. {$IFDEF FPC_HAS_TYPE_SINGLE}
  239. {$define TFLOATHELPER:=TSingleHelper}
  240. {$define FLOATTYPE:=Single}
  241. {$define TFloatRec:=TSingleRec}
  242. {$i syshelpf.inc}
  243. {$UNDEF TFloatRec}
  244. {$ENDIF FPC_HAS_TYPE_SINGLE}
  245. { ---------------------------------------------------------------------
  246. TDoubleHelper
  247. ---------------------------------------------------------------------}
  248. {$IFDEF FPC_HAS_TYPE_DOUBLE}
  249. {$define TFLOATHELPER:=TDoubleHelper}
  250. {$define FLOATTYPE:=Double}
  251. {$define TFloatRec:=TDoubleRec}
  252. {$i syshelpf.inc}
  253. {$UNDEF TFloatRec}
  254. {$ENDIF FPC_HAS_TYPE_DOUBLE}
  255. { ---------------------------------------------------------------------
  256. TExtendedHelper
  257. ---------------------------------------------------------------------}
  258. {$ifdef FPC_HAS_TYPE_EXTENDED}
  259. {$define TFLOATHELPER:=TExtendedHelper}
  260. {$define FLOATTYPE:=Extended}
  261. {$define TFloatRec:=TExtended80Rec}
  262. {$i syshelpf.inc}
  263. {$UNDEF TFloatRec}
  264. {$ENDIF FPC_HAS_TYPE_EXTENDED}
  265. { ---------------------------------------------------------------------
  266. TByteHelper
  267. ---------------------------------------------------------------------}
  268. {$define TORDINALHELPER:=TByteHelper}
  269. {$define TORDINALTYPE:=Byte}
  270. {$define TORDINALBITINDEX:=TByteBitIndex}
  271. {$define TORDINALNIBBLEINDEX:=TByteNibbleIndex}
  272. {$define TORDINALOVERLAY:=TByteOverlay}
  273. {$define TORDINALTYPESIZE1}
  274. {$i syshelpo.inc}
  275. {$undef TORDINALTYPESIZE1}
  276. { ---------------------------------------------------------------------
  277. TShortintHelper
  278. ---------------------------------------------------------------------}
  279. {$define TORDINALHELPER:=TShortIntHelper}
  280. {$define TORDINALTYPE:=ShortInt}
  281. {$define TORDINALBITINDEX:=TShortIntBitIndex}
  282. {$define TORDINALNIBBLEINDEX:=TShortIntNibbleIndex}
  283. {$define TORDINALOVERLAY:=TShortIntOverlay}
  284. {$define TORDINALTYPESIZE1}
  285. {$i syshelpo.inc}
  286. {$undef TORDINALTYPESIZE1}
  287. { ---------------------------------------------------------------------
  288. TSmallintHelper
  289. ---------------------------------------------------------------------}
  290. {$define TORDINALHELPER:=TSmallIntHelper}
  291. {$define TORDINALTYPE:=SmallInt}
  292. {$define TORDINALBITINDEX:=TSmallIntBitIndex}
  293. {$define TORDINALNIBBLEINDEX:=TSmallIntNibbleIndex}
  294. {$define TORDINALBYTEINDEX:=TWordByteIndex}
  295. {$define TORDINALOVERLAY:=TWordOverlay}
  296. {$define TORDINALTYPESIZE2}
  297. {$i syshelpo.inc}
  298. {$undef TORDINALTYPESIZE2}
  299. { ---------------------------------------------------------------------
  300. TWordHelper
  301. ---------------------------------------------------------------------}
  302. {$define TORDINALHELPER:=TWordHelper}
  303. {$define TORDINALTYPE:=Word}
  304. {$define TORDINALBITINDEX:=TWordBitIndex}
  305. {$define TORDINALNIBBLEINDEX:=TWordNibbleIndex}
  306. {$define TORDINALBYTEINDEX:=TWordByteIndex}
  307. {$define TORDINALOVERLAY:=TWordOverlay}
  308. {$define TORDINALTYPESIZE2}
  309. {$i syshelpo.inc}
  310. {$undef TORDINALTYPESIZE2}
  311. { ---------------------------------------------------------------------
  312. TCardinalHelper
  313. ---------------------------------------------------------------------}
  314. {$define TORDINALHELPER:=TCardinalHelper}
  315. {$define TORDINALTYPE:=Cardinal}
  316. {$define TORDINALBITINDEX:=TCardinalBitIndex}
  317. {$define TORDINALNIBBLEINDEX:=TCardinalNibbleIndex}
  318. {$define TORDINALBYTEINDEX:=TCardinalByteIndex}
  319. {$define TORDINALWORDINDEX:=TCardinalWordIndex}
  320. {$define TORDINALOVERLAY:=TDwordOverlay}
  321. {$define TORDINALTYPESIZE4}
  322. {$i syshelpo.inc}
  323. {$undef TORDINALTYPESIZE4}
  324. { ---------------------------------------------------------------------
  325. TIntegerHelper
  326. ---------------------------------------------------------------------}
  327. {$define TORDINALHELPER:=TIntegerHelper}
  328. {$define TORDINALTYPE:=Integer}
  329. {$define TORDINALBITINDEX:=TIntegerBitIndex}
  330. {$define TORDINALNIBBLEINDEX:=TIntegerNibbleIndex}
  331. {$define TORDINALBYTEINDEX:=TIntegerByteIndex}
  332. {$define TORDINALWORDINDEX:=TIntegerWordIndex}
  333. {$if sizeof(Integer)=2}
  334. {$define TORDINALOVERLAY:=TWordOverlay}
  335. {$define TORDINALTYPESIZE2}
  336. {$elseif sizeof(Integer)=4}
  337. {$define TORDINALOVERLAY:=TDwordOverlay}
  338. {$define TORDINALTYPESIZE4}
  339. {$else}
  340. {$fatal Unsupported Integer type size}
  341. {$endif}
  342. {$i syshelpo.inc}
  343. {$undef TORDINALTYPESIZE2}
  344. {$undef TORDINALTYPESIZE4}
  345. { ---------------------------------------------------------------------
  346. TLongIntHelper
  347. ---------------------------------------------------------------------}
  348. {$define TORDINALHELPER:=TLongIntHelper}
  349. {$define TORDINALTYPE:=LongInt}
  350. {$define TORDINALBITINDEX:=TLongIntBitIndex}
  351. {$define TORDINALNIBBLEINDEX:=TLongIntNibbleIndex}
  352. {$define TORDINALBYTEINDEX:=TLongIntByteIndex}
  353. {$define TORDINALWORDINDEX:=TLongIntWordIndex}
  354. {$define TORDINALOVERLAY:=TDwordOverlay}
  355. {$define TORDINALTYPESIZE4}
  356. {$i syshelpo.inc}
  357. {$undef TORDINALTYPESIZE4}
  358. { ---------------------------------------------------------------------
  359. TInt64Helper
  360. ---------------------------------------------------------------------}
  361. {$define TORDINALHELPER:=TInt64Helper}
  362. {$define TORDINALTYPE:=Int64}
  363. {$define TORDINALBITINDEX:=TInt64BitIndex}
  364. {$define TORDINALNIBBLEINDEX:=TInt64NibbleIndex}
  365. {$define TORDINALBYTEINDEX:=TInt64ByteIndex}
  366. {$define TORDINALWORDINDEX:=TInt64WordIndex}
  367. {$define TORDINALDWORDINDEX:=TInt64DWordIndex}
  368. {$define TORDINALOVERLAY:=TQwordOverlay}
  369. {$define TORDINALTYPESIZE8}
  370. {$i syshelpo.inc}
  371. {$undef TORDINALTYPESIZE8}
  372. { ---------------------------------------------------------------------
  373. TQWordHelper
  374. ---------------------------------------------------------------------}
  375. {$define TORDINALHELPER:=TQWordHelper}
  376. {$define TORDINALTYPE:=QWord}
  377. {$define TORDINALBITINDEX:=TQwordBitIndex}
  378. {$define TORDINALNIBBLEINDEX:=TQwordNibbleIndex}
  379. {$define TORDINALBYTEINDEX:=TQwordByteIndex}
  380. {$define TORDINALWORDINDEX:=TQWordWordIndex}
  381. {$define TORDINALDWORDINDEX:=TQWordDWordIndex}
  382. {$define TORDINALOVERLAY:=TQwordOverlay}
  383. {$define TORDINALTYPESIZE8}
  384. {$i syshelpo.inc}
  385. {$undef TORDINALTYPESIZE8}
  386. { ---------------------------------------------------------------------
  387. TNativeIntHelper
  388. ---------------------------------------------------------------------}
  389. {$define TORDINALHELPER:=TNativeIntHelper}
  390. {$define TORDINALTYPE:=NativeInt}
  391. {$define TORDINALBITINDEX:=TNativeIntBitIndex}
  392. {$if sizeof(NativeInt)=2}
  393. {$define TORDINALNIBBLEINDEX:=TSmallIntNibbleIndex}
  394. {$define TORDINALBYTEINDEX:=TSmallIntByteIndex}
  395. {$define TORDINALOVERLAY:=TSmallIntOverlay}
  396. {$define TORDINALTYPESIZE2}
  397. {$elseif sizeof(NativeInt)=4}
  398. {$define TORDINALNIBBLEINDEX:=TLongIntNibbleIndex}
  399. {$define TORDINALBYTEINDEX:=TLongIntByteIndex}
  400. {$define TORDINALWORDINDEX:=TLongIntWordIndex}
  401. {$define TORDINALOVERLAY:=TLongIntOverlay}
  402. {$define TORDINALTYPESIZE4}
  403. {$elseif sizeof(NativeInt)=8}
  404. {$define TORDINALNIBBLEINDEX:=TInt64NibbleIndex}
  405. {$define TORDINALBYTEINDEX:=TInt64ByteIndex}
  406. {$define TORDINALWORDINDEX:=TInt64WordIndex}
  407. {$define TORDINALDWORDINDEX:=TInt64DWordIndex}
  408. {$define TORDINALOVERLAY:=TInt64Overlay}
  409. {$define TORDINALTYPESIZE8}
  410. {$else}
  411. {$fatal Unsupported NativeInt type size}
  412. {$endif}
  413. {$i syshelpo.inc}
  414. {$undef TORDINALTYPESIZE2}
  415. {$undef TORDINALTYPESIZE4}
  416. {$undef TORDINALTYPESIZE8}
  417. { ---------------------------------------------------------------------
  418. TNativeUIntHelper
  419. ---------------------------------------------------------------------}
  420. {$define TORDINALHELPER:=TNativeUIntHelper}
  421. {$define TORDINALTYPE:=NativeUInt}
  422. {$define TORDINALBITINDEX:=TNativeUIntBitIndex}
  423. {$if sizeof(NativeUInt)=2}
  424. {$define TORDINALNIBBLEINDEX:=TWordNibbleIndex}
  425. {$define TORDINALBYTEINDEX:=TWordByteIndex}
  426. {$define TORDINALOVERLAY:=TWordOverlay}
  427. {$define TORDINALTYPESIZE2}
  428. {$elseif sizeof(NativeUInt)=4}
  429. {$define TORDINALNIBBLEINDEX:=TDwordNibbleIndex}
  430. {$define TORDINALBYTEINDEX:=TDwordByteIndex}
  431. {$define TORDINALWORDINDEX:=TDwordWordIndex}
  432. {$define TORDINALOVERLAY:=TDwordOverlay}
  433. {$define TORDINALTYPESIZE4}
  434. {$elseif sizeof(NativeUInt)=8}
  435. {$define TORDINALNIBBLEINDEX:=TQwordNibbleIndex}
  436. {$define TORDINALBYTEINDEX:=TQwordByteIndex}
  437. {$define TORDINALWORDINDEX:=TQwordWordIndex}
  438. {$define TORDINALDWORDINDEX:=TQwordDWordIndex}
  439. {$define TORDINALOVERLAY:=TQwordOverlay}
  440. {$define TORDINALTYPESIZE8}
  441. {$else}
  442. {$fatal Unsupported NativeUInt type size}
  443. {$endif}
  444. {$i syshelpo.inc}
  445. {$undef TORDINALTYPESIZE2}
  446. {$undef TORDINALTYPESIZE4}
  447. {$undef TORDINALTYPESIZE8}
  448. { ---------------------------------------------------------------------
  449. TBooleanHelper
  450. ---------------------------------------------------------------------}
  451. {$define TBOOLHELPER:=TBooleanHelper}
  452. {$define TBOOLTYPE:=Boolean}
  453. {$i syshelpb.inc}
  454. { ---------------------------------------------------------------------
  455. TBoolean8Helper
  456. ---------------------------------------------------------------------}
  457. {$define TBOOLHELPER:=TBoolean8Helper}
  458. {$define TBOOLTYPE:=Boolean8}
  459. {$i syshelpb.inc}
  460. { ---------------------------------------------------------------------
  461. TBoolean16Helper
  462. ---------------------------------------------------------------------}
  463. {$define TBOOLHELPER:=TBoolean16Helper}
  464. {$define TBOOLTYPE:=Boolean16}
  465. {$i syshelpb.inc}
  466. { ---------------------------------------------------------------------
  467. TBoolean32Helper
  468. ---------------------------------------------------------------------}
  469. {$define TBOOLHELPER:=TBoolean32Helper}
  470. {$define TBOOLTYPE:=Boolean32}
  471. {$i syshelpb.inc}
  472. { ---------------------------------------------------------------------
  473. TBoolean64Helper
  474. ---------------------------------------------------------------------}
  475. {$define TBOOLHELPER:=TBoolean64Helper}
  476. {$define TBOOLTYPE:=Boolean64}
  477. {$i syshelpb.inc}
  478. { ---------------------------------------------------------------------
  479. TByteBoolHelper
  480. ---------------------------------------------------------------------}
  481. {$define TBOOLHELPER:=TByteBoolHelper}
  482. {$define TBOOLTYPE:=ByteBool}
  483. {$i syshelpb.inc}
  484. { ---------------------------------------------------------------------
  485. TWordBoolHelper
  486. ---------------------------------------------------------------------}
  487. {$define TBOOLHELPER:=TWordBoolHelper}
  488. {$define TBOOLTYPE:=WordBool}
  489. {$i syshelpb.inc}
  490. { ---------------------------------------------------------------------
  491. TLongBoolHelper
  492. ---------------------------------------------------------------------}
  493. {$define TBOOLHELPER:=TLongBoolHelper}
  494. {$define TBOOLTYPE:=LongBool}
  495. {$i syshelpb.inc}
  496. { ---------------------------------------------------------------------
  497. TQWordBoolHelper
  498. ---------------------------------------------------------------------}
  499. {$define TBOOLHELPER:=TQWordBoolHelper}
  500. {$define TBOOLTYPE:=QWordBool}
  501. {$i syshelpb.inc}