Reference Codebot.System.pas
Part of the Codebot package
The Codebot.System unit defines the types and routines used throughout the library. It declares Float, which is the floating point type used by the library, along with the other basic types and TArray
The unit includes the following:
- TArrayList
, an extension of dynamic arrays that can sort, search, and filter its items, and TStack , a fixed size stack, along with the compare and convert function types they use. - Math, time, string, and file management routines.
- Helpers that add methods to strings, numbers, and TStrings.
- Named values and named strings, which are simple dictionaries keyed by name.
- Delegates, which publish an event to any number of subscribers, and TChangeNotifier, which notifies owners when something changes.
- A null stream, which counts the bytes written to it without storing them.
- Threading support, including mutexes, events, asynchronous tasks, TSimpleThread, and routines that wait.
Finally, WriteLine writes formatted text to the console.
Items 379 items
| Name | Kind | Line |
|---|---|---|
| Ceil | function | 324 |
| Clamp | function | 334 |
| ConfigAppDir | function | 750 |
| ConfigAppFile | function | 748 |
| DegToRad | function | 338 |
| DirChange | procedure | 716 |
| DirCreate | function | 714 |
| DirDelete | function | 724 |
| DirExists | function | 726 |
| DirForce | function | 728 |
| DirGetCurrent | function | 718 |
| DirGetTemp | function | 722 |
| DirSetCurrent | function | 720 |
| Divide | function | 320 |
| EAsyncException | class | 1198 |
| ELibraryException | class | 84 |
| Create | constructor | 91 |
| ModuleName | property | 93 |
| ProcName | property | 96 |
| EStackError | class | 277 |
| EventCreate | function | 1184 |
| faAnyFile | constant | 765 |
| faArchive | constant | 763 |
| faDirectory | constant | 762 |
| faHidden | constant | 759 |
| faReadOnly | constant | 758 |
| faSymLink | constant | 764 |
| faSysFile | constant | 760 |
| faVolumeId | constant | 761 |
| FileChangeExt | function | 704 |
| FileDate | function | 696 |
| FileDelete | function | 686 |
| FileExists | function | 692 |
| FileExtractExt | function | 702 |
| FileExtractName | function | 698 |
| FileExtractNameOnly | function | 700 |
| FileExtractPath | function | 706 |
| FileReadStr | function | 710 |
| FileRename | function | 690 |
| FileSize | function | 694 |
| FileWriteLine | procedure | 712 |
| FileWriteStr | procedure | 708 |
| FillZero | procedure | 115 |
| FindFileParams | procedure | 753 |
| FindFiles | procedure | 771, 793 |
| FindOpen | function | 768 |
| Float | alias | 25 |
| FloatToByte | function | 336 |
| FloatToCommas | function | 502 |
| FloatToStr | function | 498, 500 |
| Floor | function | 326 |
| GetPlatform | function | 105 |
| HFile | alias | 41 |
| HiByte | constant | 61 |
| HModule | alias | 52 |
| IAsyncTask | interface | 1206 |
| Cancel | procedure | 1217 |
| Wait | procedure | 1219 |
| Cancelled | property | 1221 |
| Data | property | 1223 |
| Duration | property | 1229 |
| Progress | property | 1225 |
| StartTime | property | 1227 |
| Status | property | 1231 |
| ICloneable | interface | 135 |
| Clone | function | 138 |
| IDelegate | interface | 963 |
| Add | procedure | 968 |
| GetIsEmpty | function | 966 |
| Remove | procedure | 970 |
| IsEmpty | property | 972 |
| IEvent | interface | 1172 |
| Reset | procedure | 1174 |
| Signal | procedure | 1176 |
| Wait | procedure | 1178 |
| IFloatPropertyNotify | interface | 1060 |
| PropChange | procedure | 1063 |
| IMethodDelegate | alias | 1038 |
| IMutex | interface | 1159 |
| Lock | function | 1161 |
| Unlock | function | 1163 |
| INamedStrings | interface | 898 |
| INamedValues | interface | 863 |
| Add | procedure | 873 |
| Clear | procedure | 879 |
| Delete | procedure | 877 |
| Remove | procedure | 875 |
| Count | property | 881 |
| Empty | property | 883 |
| Names | property | 885 |
| ValueByIndex | property | 889 |
| Values | property | 887 |
| Infinity | constant | 315 |
| INotifyDelegate | alias | 1032 |
| IntHelper | helper | 636 |
| Between | function | 641 |
| ToString | function | 639 |
| IntPower | function | 342 |
| IntToStr | function | 492 |
| IsMainThread | function | 1150 |
| IStopwatch | interface | 356 |
| Calculate | function | 364 |
| Reset | procedure | 366 |
| Paused | property | 370 |
| Time | property | 368 |
| LargeInt | alias | 29 |
| LargeWord | alias | 33 |
| LibraryGetProc | function | 76 |
| LibraryLoad | function | 67 |
| LibraryUnload | function | 71 |
| LineBreak | function | 389 |
| LineBreakStyles | constant | 384 |
| MemCompare | function | 1067 |
| ModuleNil | constant | 56 |
| Modulus | function | 318 |
| MutexCreate | function | 1182 |
| Now | function | 675 |
| NowTime | procedure | 679 |
| PathAdjustDelimiters | function | 730 |
| PathCombine | function | 732 |
| PathExcludeDelimiter | function | 738 |
| PathExpand | function | 734 |
| PathIncludeDelimiter | function | 736 |
| PFloat | pointer | 27 |
| PLargeInt | pointer | 31 |
| PLargeWord | pointer | 35 |
| PSysInt | pointer | 39 |
| PumpMessages | procedure | 1302 |
| PumpMessagesProc | variable | 1298 |
| RadToDeg | function | 340 |
| Remainder | function | 322 |
| ResLoadData | function | 742 |
| ResLoadText | function | 744 |
| ResSaveData | function | 746 |
| SharedSuffix | constant | 59 |
| SinCos | procedure | 330, 332 |
| Sleep | procedure | 1290 |
| StopwatchCreate | function | 376 |
| StrAdjustLineBreaks | function | 466, 468 |
| StrBeginsWith | function | 446 |
| StrCompare | function | 402 |
| StrCompPath | function | 512 |
| StrContains | function | 444 |
| StrCopy | function | 395 |
| StrCopyData | function | 397 |
| StreamReadStr | function | 740 |
| StrEndsWith | function | 448 |
| StrEnvironmentVariable | function | 508 |
| StrEquals | function | 420, 422 |
| StrFind | function | 404, 406 |
| StrFindCount | function | 408 |
| StrFindIndex | function | 410 |
| StrFirstOf | function | 438 |
| StrFormat | function | 510 |
| StrIndex | function | 424 |
| StringHelper | helper | 521 |
| AdjustLineBreaks | function | 619, 621 |
| ArrayIndex | function | 574 |
| BeginsWith | function | 601, 603 |
| Between | function | 597 |
| CharInto | procedure | 535 |
| Compare | function | 546 |
| Contains | function | 599 |
| Copy | function | 552 |
| CopyInto | procedure | 537 |
| EndsWith | function | 605, 607 |
| Equals | function | 541, 543 |
| FirstOf | function | 591 |
| Format | function | 615 |
| IndexOf | function | 556, 558 |
| Insert | function | 554 |
| InsertInto | procedure | 539 |
| LastOf | function | 595 |
| LineBreakStyle | function | 617 |
| Lines | function | 576 |
| LineWith | function | 578 |
| MatchCount | function | 560 |
| Matches | function | 562 |
| PadLeft | function | 609 |
| PadRight | function | 611 |
| Quote | function | 613 |
| RemoveLast | function | 564 |
| Replace | function | 566 |
| ReplaceAfter | function | 570 |
| ReplaceOne | function | 568 |
| SecondOf | function | 593 |
| Split | function | 580 |
| SplitInt | function | 582 |
| SplitInt64 | function | 584 |
| SplitTokens | function | 586 |
| ToLower | function | 550 |
| ToString | function | 531 |
| ToUpper | function | 548 |
| Trim | function | 572 |
| Unique | procedure | 533 |
| Words | function | 589 |
| IsAttribute | property | 629 |
| IsEmpty | property | 623 |
| IsIdentifier | property | 627 |
| IsWhitespace | property | 625 |
| Length | property | 631 |
| StrInsert | function | 399 |
| StrIsAttr | function | 462 |
| StrIsBlank | function | 458 |
| StrIsIdent | function | 460 |
| StrJoin | function | 434 |
| StrJoinInt | function | 436 |
| StrLastOf | function | 442 |
| StrLineBreakStyle | function | 464 |
| StrLower | function | 393 |
| StrOf | function | 450 |
| StrPadLeft | function | 452 |
| StrPadRight | function | 454 |
| StrQuote | function | 456 |
| StrReplace | function | 412 |
| StrReplaceAfter | function | 416 |
| StrReplaceOne | function | 414 |
| StrSecondOf | function | 440 |
| StrSplit | function | 426 |
| StrSplitInt | function | 428 |
| StrSplitInt64 | function | 430 |
| StrSplitTokens | function | 432 |
| StrToBin | function | 490 |
| StrToFloat | function | 504 |
| StrToFloatDef | function | 506 |
| StrToInt | function | 494 |
| StrToIntDef | function | 496 |
| StrToWide | function | 470 |
| StrTrim | function | 418 |
| StrUpper | function | 391 |
| SwitchChar | constant | 386 |
| SwitchExists | function | 478 |
| SwitchIndex | function | 483 |
| SwitchValue | function | 488 |
| SysInt | alias | 37 |
| Tan | function | 328 |
| TArray | array | 111 |
| TArrayList | record | 164 |
| DefaultCompare | field | 184 |
| DefaultConvertString | field | 186 |
| Items | field | 188 |
| ArrayOf | function | 190 |
| Clear | procedure | 226 |
| Convert | function | 192 |
| Copy | procedure | 200 |
| CopyFast | procedure | 202 |
| Delete | procedure | 224 |
| Exchange | procedure | 210 |
| Filter | function | 220 |
| FirstOf | function | 222 |
| GetEnumerator | function | 169 |
| Hi | function | 206 |
| Implicit | operator | 194, 196, 198 |
| IndexOf | function | 230 |
| Join | function | 232 |
| Lo | function | 204 |
| Pop | function | 216 |
| PopRandom | function | 218 |
| Push | procedure | 212 |
| PushRange | procedure | 214 |
| Reverse | procedure | 208 |
| Sort | procedure | 228 |
| Data | property | 242 |
| First | property | 236 |
| IsEmpty | property | 234 |
| Item | property | 244 |
| Last | property | 238 |
| Length | property | 240 |
| TAsyncStatus | enum | 1194 |
| asyncBusy | enum value | 1194 |
| asyncSuccess | enum value | 1194 |
| asyncFail | enum value | 1194 |
| asyncCanceled | enum value | 1194 |
| TChangeNotifier | class | 1044 |
| Change | procedure | 1050 |
| OnChange | property | 1053 |
| TCompare | procedural | 121 |
| TConvertString | procedural | 125 |
| TDateTimeHelper | helper | 646 |
| AddMinutes | function | 651 |
| Day | function | 657 |
| Month | function | 655 |
| ToString | function | 649 |
| Year | function | 653 |
| TDelegate | record | 1009 |
| Add | procedure | 1022 |
| GetEnumerator | function | 1018 |
| GetIsEmpty | function | 1020 |
| Implicit | operator | 1016 |
| Remove | procedure | 1024 |
| IsEmpty | property | 1026 |
| TFileSearch | alias | 790 |
| TFileSearchHelper | helper | 798 |
| SortModified | procedure | 805 |
| SortName | procedure | 801 |
| SortSize | procedure | 803 |
| TFileSearchItem | record | 776 |
| Attributes | field | 785 |
| Modified | field | 783 |
| Name | field | 779 |
| Size | field | 781 |
| TFilterFunc | procedural | 129 |
| ThreadExecute | function | 1278, 1282, 1286 |
| TimeQuery | function | 348 |
| TInterfacedFree | class | 942 |
| Component | field | 952 |
| Create | constructor | 954 |
| Destroy | destructor | 956 |
| ReleaseComponent | procedure | 949 |
| TMatrixOrder | enum | 46 |
| moPrepend | enum value | 46 |
| moAppend | enum value | 46 |
| TMethodDelegate | alias | 1036 |
| TMethodEvent | procedural | 1034 |
| TNamedEnumerable | record | 851 |
| Enumerator | field | 854 |
| GetEnumerator | function | 856 |
| TNamedStrings | alias | 894 |
| TNamedStringsIntf | class | 928 |
| TNamedValues | record | 814 |
| Add | procedure | 828 |
| Clear | procedure | 834 |
| Delete | procedure | 832 |
| GetEnumerator | function | 817 |
| HasName | function | 836 |
| Remove | procedure | 830 |
| Count | property | 838 |
| Empty | property | 840 |
| Names | property | 842 |
| ValueByIndex | property | 846 |
| Values | property | 844 |
| TNamedValuesIntf | class | 906 |
| TNotifyDelegate | alias | 1030 |
| TNullInfo | class | 1083 |
| Reset | function | 1098 |
| Avergage | property | 1104 |
| Bytes | property | 1100 |
| Rate | property | 1102 |
| Seconds | property | 1106 |
| TNullResult | alias | 1076 |
| TNullStream | class | 1113 |
| Create | constructor | 1125 |
| Destroy | destructor | 1127 |
| Read | function | 1132 |
| Seek | function | 1139 |
| Write | function | 1137 |
| ReadInfo | property | 1141 |
| WriteInfo | property | 1143 |
| TPlatform | enum | 101 |
| platformLinux | enum value | 101 |
| platformMac | enum value | 101 |
| platformWindowsXP | enum value | 101 |
| platformWindows | enum value | 101 |
| TSimpleThread | class | 1246 |
| Create | constructor | 1259 |
| Execute | procedure | 1256 |
| Synchronize | procedure | 1263 |
| Status | property | 1265 |
| Terminated | property | 1267 |
| TSortingOrder | enum | 158 |
| soAscend | enum value | 158 |
| soDescend | enum value | 158 |
| soNone | enum value | 158 |
| TStack | record | 284 |
| Create | function | 296 |
| Pop | function | 300 |
| Push | procedure | 298 |
| First | property | 306 |
| Index | property | 304 |
| IsEmpty | property | 302 |
| Last | property | 308 |
| TStringsHelper | helper | 662 |
| AddFormat | procedure | 667 |
| AddLine | procedure | 665 |
| Contains | function | 670 |
| TThreadExecuteMethod | procedural | 1240 |
| TThreadExecuteProc | procedural | 1272 |
| WideToStr | function | 472 |
| WriteDebug | procedure | 1307, 1309 |