-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ExplicitStringLists_Unicode.pas
130 lines (89 loc) · 3.95 KB
/
ExplicitStringLists_Unicode.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{-------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-------------------------------------------------------------------------------}
{===============================================================================
Explicit string lists - Unicode
Implementation of list of unicode strings.
Version 1.1.2 (2021-11-22)
Last change 2024-02-03
©2017-2024 František Milt
Contacts:
František Milt: frantisek.milt@gmail.com
Support:
If you find this code useful, please consider supporting its author(s) by
making a small donation using the following link(s):
https://www.paypal.me/FMilt
Changelog:
For detailed changelog and history please refer to this git repository:
github.com/TheLazyTomcat/ExplicitStringLists
Dependencies:
AuxTypes - github.com/TheLazyTomcat/Lib.AuxTypes
AuxClasses - github.com/TheLazyTomcat/Lib.AuxClasses
StrRect - github.com/TheLazyTomcat/Lib.StrRect
ListSorters - github.com/TheLazyTomcat/Lib.ListSorters
StaticMemoryStream - github.com/TheLazyTomcat/Lib.StaticMemoryStream
* BinaryStreamingLite - github.com/TheLazyTomcat/Lib.BinaryStreamingLite
MemoryBuffer - github.com/TheLazyTomcat/Lib.MemoryBuffer
BinaryStreamingLite can be replaced by full BinaryStreaming.
===============================================================================}
unit ExplicitStringLists_Unicode;
{$INCLUDE '.\ExplicitStringLists_defs.inc'}
interface
uses
Classes,
AuxTypes,
ExplicitStringLists_Base;
{$DEFINE ESL_Unicode}
type
TESLCharType = UnicodeChar;
TESLPCharType = PUnicodeChar;
TESLStringType = UnicodeString;
TESLPStringType = PUnicodeString;
TESLLongStringType = UnicodeString;
type
TUnicodeStringList = class; // forward declaration
TESLClassType = TUnicodeStringList;
TESLUnicodeSortCompareIndex = Function(List: TUnicodeStringList; Idx1,Idx2: Integer): Integer;
TESLUnicodeSortCompareString = Function(List: TUnicodeStringList; const Str1,Str2: TESLStringType): Integer;
TESLSortCompareIndexType = TESLUnicodeSortCompareIndex;
TESLSortCompareStringType = TESLUnicodeSortCompareString;
{$DEFINE ESL_ClassTypes}
{$INCLUDE './ExplicitStringLists.inc'}
{$UNDEF ESL_ClassTypes}
TESLUnicodeItemBinaryIOEvent = procedure(Sender: TObject; Stream: TStream; var Item: TESLListItem) of Object;
TESLUnicodeItemBinaryIOCallback = procedure(Sender: TObject; Stream: TStream; var Item: TESLListItem);
TESLItemBinaryIOEventType = TESLUnicodeItemBinaryIOEvent;
TESLItemBinaryIOCallbackType = TESLUnicodeItemBinaryIOCallback;
TUnicodeStringList = class(TExplicitStringList)
{$DEFINE ESL_ClassDeclaration}
{$INCLUDE './ExplicitStringLists.inc'}
{$UNDEF ESL_ClassDeclaration}
end;
implementation
uses
SysUtils,
StrRect, BinaryStreamingLite, MemoryBuffer, StaticMemoryStream;
{$IFDEF FPC_DisableWarns}
{$DEFINE FPCDWM}
{$DEFINE W5024:={$WARN 5024 OFF}} // Parameter "$1" not used
{$ENDIF}
{===============================================================================
Main implementation
===============================================================================}
const
ESL_IMPLSTR_NAME = 'unicode';
//------------------------------------------------------------------------------
{$DEFINE ESL_ClassAuxiliary}
{$INCLUDE './ExplicitStringLists.inc'}
{$UNDEF ESL_ClassAuxiliary}
//------------------------------------------------------------------------------
{$DEFINE ESL_ClassDelimitedTextParser}
{$INCLUDE './ExplicitStringLists.inc'}
{$UNDEF ESL_ClassDelimitedTextParser}
//------------------------------------------------------------------------------
{$DEFINE ESL_ClassImplementation}
{$INCLUDE './ExplicitStringLists.inc'}
{$UNDEF ESL_ClassImplementation}
end.