Rev 92 | Rev 94 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 92 | Rev 93 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | unit AsciiTable; |
1 | unit AsciiTable; |
2 | 2 | ||
3 | (* |
3 | (* |
4 | * ASCII Table and CSV Generator Delphi Unit |
4 | * ASCII Table and CSV Generator Delphi Unit |
5 | * Revision 2022-07-11 |
5 | * Revision 2022-07-15 |
6 | * |
6 | * |
7 | * (C) 2022 Daniel Marschall, HickelSOFT, ViaThinkSoft |
7 | * (C) 2022 Daniel Marschall, HickelSOFT, ViaThinkSoft |
8 | * Licensed under the terms of Apache 2.0 |
8 | * Licensed under the terms of Apache 2.0 |
9 | *) |
9 | *) |
10 | 10 | ||
Line 106... | Line 106... | ||
106 | private |
106 | private |
107 | function GetItem(Index: Integer): TVtsAsciiTableLine; |
107 | function GetItem(Index: Integer): TVtsAsciiTableLine; |
108 | procedure SetItem(Index: Integer; const Value: TVtsAsciiTableLine); |
108 | procedure SetItem(Index: Integer; const Value: TVtsAsciiTableLine); |
109 | public |
109 | public |
110 | function GetAnalysis: TVtsAsciiTableAnalysis; |
110 | function GetAnalysis: TVtsAsciiTableAnalysis; |
111 | procedure GetASCIITable(sl: TStrings; spaceBetween: integer=3); |
111 | procedure GetASCIITable(sl: TStrings; spaceBetween: integer=3); overload; |
- | 112 | function GetASCIITable(spaceBetween: integer=3): string; overload; |
|
112 | procedure SaveASCIITable(filename: string; spaceBetween: integer=3); |
113 | procedure SaveASCIITable(filename: string; spaceBetween: integer=3); |
113 | procedure GetCSV(sl: TStrings); |
114 | procedure GetCSV(sl: TStrings); |
114 | procedure SaveCSV(filename: string); |
115 | procedure SaveCSV(filename: string); |
115 | 116 | ||
116 | procedure AddSeparator; |
117 | procedure AddSeparator; |
Line 192... | Line 193... | ||
192 | end; |
193 | end; |
193 | end; |
194 | end; |
194 | end; |
195 | end; |
195 | end; |
196 | end; |
196 | 197 | ||
- | 198 | function TVtsAsciiTable.GetASCIITable(spaceBetween: integer): string; |
|
- | 199 | var |
|
- | 200 | sl: TStringList; |
|
- | 201 | begin |
|
- | 202 | sl := TStringList.Create; |
|
- | 203 | try |
|
- | 204 | GetASCIITable(sl, spaceBetween); |
|
- | 205 | result := sl.Text; |
|
- | 206 | finally |
|
- | 207 | FreeAndNil(sl); |
|
- | 208 | end; |
|
- | 209 | end; |
|
- | 210 | ||
197 | procedure TVtsAsciiTable.GetASCIITable(sl: TStrings; spaceBetween: integer=3); |
211 | procedure TVtsAsciiTable.GetASCIITable(sl: TStrings; spaceBetween: integer=3); |
198 | var |
212 | var |
199 | analysis: TVtsAsciiTableAnalysis; |
213 | analysis: TVtsAsciiTableAnalysis; |
200 | objLine: TVtsAsciiTableLine; |
214 | objLine: TVtsAsciiTableLine; |
201 | i: Integer; |
215 | i: Integer; |