Luxophia

Форк
0
/
LUX.Audio.SDIF.Matrixs.pas 
604 строки · 19.8 Кб
1
unit LUX.Audio.SDIF.Matrixs;
2

3
interface //#################################################################### ■
4

5
uses System.Classes, System.RegularExpressions,
6
     LUX, LUX.Audio.SDIF;
7

8
type //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【型】
9

10
     TMatrixSDIF<TVALUE:record> = class;
11
       TMatrixChar              = class;
12
       TMatrixFlo4              = class;
13
       TMatrixFlo8              = class;
14
       TMatrixInt1              = class;
15
       TMatrixInt2              = class;
16
       TMatrixInt4              = class;
17
       TMatrixInt8              = class;
18
       TMatrixUIn1              = class;
19
       TMatrixUIn2              = class;
20
       TMatrixUIn4              = class;
21
       TMatrixUIn8              = class;
22

23
     //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【レコード】
24

25
     //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【クラス】
26

27
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixSDIF<TVALUE>
28

29
     TMatrixSDIF<TVALUE:record> = class( TMatrixSDIF )
30
     private
31
       class var _Reg :TRegEx;
32
     protected
33
       _Values :TArray<TVALUE>;
34
       ///// アクセス
35
       procedure SetColCount( const ColCount_:Integer ); override;
36
       procedure SetRowCount( const RowCount_:Integer ); override;
37
       function GetValues( const Y_,X_:Integer ) :TVALUE; virtual;
38
       procedure SetValues( const Y_,X_:Integer; const Value_:TVALUE ); virtual;
39
       ///// メソッド
40
       procedure ReadValues( const F_:TFileStream ); override;
41
       procedure ReadValues( const F_:TStreamReader ); override;
42
     public
43
       class constructor Create;
44
       constructor Create; override;
45
       destructor Destroy; override;
46
       ///// プロパティ
47
       property Values[ const Y_,X_:Integer ] :TVALUE read GetValues write SetValues;
48
     end;
49

50
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixChar
51

52
     TMatrixChar = class( TMatrixSDIF<AnsiChar> )
53
     private
54
     protected
55
       ///// アクセス
56
       function GetTexts( const Y_,X_:Integer ) :String; override;
57
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
58
       function GetLines( const Y_:Integer ) :String; virtual;
59
     public
60
       ///// プロパティ
61
       property Lines[ const Y_:Integer ] :String read GetLines;
62
     end;
63

64
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixFlo4
65

66
     TMatrixFlo4 = class( TMatrixSDIF<Single> )
67
     private
68
     protected
69
       ///// アクセス
70
       function GetValues( const Y_,X_:Integer ) :Single; override;
71
       procedure SetValues( const Y_,X_:Integer; const Value_:Single ); override;
72
       function GetTexts( const Y_,X_:Integer ) :String; override;
73
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
74
     public
75
     end;
76

77
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixFlo8
78

79
     TMatrixFlo8 = class( TMatrixSDIF<Double> )
80
     private
81
     protected
82
       ///// アクセス
83
       function GetValues( const Y_,X_:Integer ) :Double; override;
84
       procedure SetValues( const Y_,X_:Integer; const Value_:Double ); override;
85
       function GetTexts( const Y_,X_:Integer ) :String; override;
86
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
87
     public
88
     end;
89

90
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixInt1
91

92
     TMatrixInt1 = class( TMatrixSDIF<Int8> )
93
     private
94
     protected
95
       ///// アクセス
96
       function GetTexts( const Y_,X_:Integer ) :String; override;
97
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
98
     public
99
     end;
100

101
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixInt2
102

103
     TMatrixInt2 = class( TMatrixSDIF<Int16> )
104
     private
105
     protected
106
       ///// アクセス
107
       function GetValues( const Y_,X_:Integer ) :Int16; override;
108
       procedure SetValues( const Y_,X_:Integer; const Value_:Int16 ); override;
109
       function GetTexts( const Y_,X_:Integer ) :String; override;
110
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
111
     public
112
     end;
113

114
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixInt4
115

116
     TMatrixInt4 = class( TMatrixSDIF<Int32> )
117
     private
118
     protected
119
       ///// アクセス
120
       function GetValues( const Y_,X_:Integer ) :Int32; override;
121
       procedure SetValues( const Y_,X_:Integer; const Value_:Int32 ); override;
122
       function GetTexts( const Y_,X_:Integer ) :String; override;
123
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
124
     public
125
     end;
126

127
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixInt8
128

129
     TMatrixInt8 = class( TMatrixSDIF<Int64> )
130
     private
131
     protected
132
       ///// アクセス
133
       function GetValues( const Y_,X_:Integer ) :Int64; override;
134
       procedure SetValues( const Y_,X_:Integer; const Value_:Int64 ); override;
135
       function GetTexts( const Y_,X_:Integer ) :String; override;
136
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
137
     public
138
     end;
139

140
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixUIn1
141

142
     TMatrixUIn1 = class( TMatrixSDIF<UInt8> )
143
     private
144
     protected
145
       ///// アクセス
146
       function GetTexts( const Y_,X_:Integer ) :String; override;
147
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
148
     public
149
     end;
150

151
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixUIn2
152

153
     TMatrixUIn2 = class( TMatrixSDIF<UInt16> )
154
     private
155
     protected
156
       ///// アクセス
157
       function GetValues( const Y_,X_:Integer ) :UInt16; override;
158
       procedure SetValues( const Y_,X_:Integer; const Value_:UInt16 ); override;
159
       function GetTexts( const Y_,X_:Integer ) :String; override;
160
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
161
     public
162
     end;
163

164
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixUIn4
165

166
     TMatrixUIn4 = class( TMatrixSDIF<UInt32> )
167
     private
168
     protected
169
       ///// アクセス
170
       function GetValues( const Y_,X_:Integer ) :UInt32; override;
171
       procedure SetValues( const Y_,X_:Integer; const Value_:UInt32 ); override;
172
       function GetTexts( const Y_,X_:Integer ) :String; override;
173
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
174
     public
175
     end;
176

177
     //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixUIn8
178

179
     TMatrixUIn8 = class( TMatrixSDIF<UInt64> )
180
     private
181
     protected
182
       ///// アクセス
183
       function GetValues( const Y_,X_:Integer ) :UInt64; override;
184
       procedure SetValues( const Y_,X_:Integer; const Value_:UInt64 ); override;
185
       function GetTexts( const Y_,X_:Integer ) :String; override;
186
       procedure SetTexts( const Y_,X_:Integer; const Text_:String ); override;
187
     public
188
     end;
189

190
//const //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【定数】
191

192
//var //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【変数】
193

194
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【ルーチン】
195

196
implementation //############################################################### ■
197

198
uses System.SysUtils, System.Math;
199

200
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【レコード】
201

202
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【クラス】
203

204
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixSDIF<TVALUE>
205

206
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
207

208
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
209

210
/////////////////////////////////////////////////////////////////////// アクセス
211

212
procedure TMatrixSDIF<TVALUE>.SetRowCount( const RowCount_:Integer );
213
begin
214
     inherited;
215

216
     SetLength( _Values, _RowCount * _ColCount );
217
end;
218

219
procedure TMatrixSDIF<TVALUE>.SetColCount( const ColCount_:Integer );
220
begin
221
     inherited;
222

223
     SetLength( _Values, _RowCount * _ColCount );
224
end;
225

226
function TMatrixSDIF<TVALUE>.GetValues( const Y_,X_:Integer ) :TVALUE;
227
begin
228
     Result := _Values[ Y_ * _ColCount + X_ ];
229
end;
230

231
procedure TMatrixSDIF<TVALUE>.SetValues( const Y_,X_:Integer; const Value_:TVALUE );
232
begin
233
     _Values[ Y_ * _ColCount + X_ ] := Value_;
234
end;
235

236
/////////////////////////////////////////////////////////////////////// メソッド
237

238
procedure TMatrixSDIF<TVALUE>.ReadValues( const F_:TFileStream );
239
var
240
   N, P :Integer;
241
begin
242
     N := _RowCount * _ColCount * SizeOf( TVALUE );
243

244
     F_.Read( _Values[ 0 ], N );
245

246
     P := 8 * Ceil( N / 8 ) - N;
247

248
     F_.Seek( P, soFromCurrent );  // 8 Bytes のアライメント
249
end;
250

251
procedure TMatrixSDIF<TVALUE>.ReadValues( const F_:TStreamReader );
252
var
253
   Y, X :Integer;
254
   Ms :TMatchCollection;
255
begin
256
     for Y := 0 to _RowCount-1 do
257
     begin
258
          Ms := _Reg.Matches( F_.ReadLine );
259

260
          for X := 0 to _ColCount-1 do Texts[ Y, X ] := Ms[ X ].Groups[ 1 ].Value;
261
     end;
262
end;
263

264
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
265

266
class constructor TMatrixSDIF<TVALUE>.Create;
267
begin
268
     inherited;
269

270
     _Reg := TRegEx.Create( '\s+(\S+)' );
271
end;
272

273
constructor TMatrixSDIF<TVALUE>.Create;
274
begin
275
     inherited;
276

277
end;
278

279
destructor TMatrixSDIF<TVALUE>.Destroy;
280
begin
281

282
     inherited;
283
end;
284

285
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixChar
286

287
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
288

289
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
290

291
/////////////////////////////////////////////////////////////////////// アクセス
292

293
function TMatrixChar.GetTexts( const Y_,X_:Integer ) :String;
294
begin
295
     Result := Char( Values[ Y_, X_ ] );
296
end;
297

298
procedure TMatrixChar.SetTexts( const Y_,X_:Integer; const Text_:String );
299
begin
300
     Values[ Y_, X_ ] := AnsiChar( Text_[ 2 ] );
301
end;
302

303
function TMatrixChar.GetLines( const Y_:Integer ) :String;
304
var
305
   X :Integer;
306
begin
307
     Result := '';
308

309
     for X := 0 to ColCount-1 do Result := Result + Char( Values[ Y_, X ] );
310
end;
311

312
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
313

314
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixFlo4
315

316
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
317

318
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
319

320
/////////////////////////////////////////////////////////////////////// アクセス
321

322
function TMatrixFlo4.GetValues( const Y_,X_:Integer ) :Single;
323
begin
324
     Result := RevBytes( inherited GetValues( Y_, X_ ) );
325
end;
326

327
procedure TMatrixFlo4.SetValues( const Y_,X_:Integer; const Value_:Single );
328
begin
329
     inherited SetValues( Y_, X_, RevBytes( Value_ ) );
330
end;
331

332
function TMatrixFlo4.GetTexts( const Y_,X_:Integer ) :String;
333
begin
334
     Result := Values[ Y_, X_ ].ToString;
335
end;
336

337
procedure TMatrixFlo4.SetTexts( const Y_,X_:Integer; const Text_:String );
338
begin
339
     if Text_ = 'nan' then Values[ Y_, X_ ] := Single.NaN
340
                      else Values[ Y_, X_ ] := Text_.ToSingle;
341
end;
342

343
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
344

345
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixFlo8
346

347
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
348

349
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
350

351
/////////////////////////////////////////////////////////////////////// アクセス
352

353
function TMatrixFlo8.GetValues( const Y_,X_:Integer ) :Double;
354
begin
355
     Result := RevBytes( inherited GetValues( Y_, X_ ) );
356
end;
357

358
procedure TMatrixFlo8.SetValues( const Y_,X_:Integer; const Value_:Double );
359
begin
360
     inherited SetValues( Y_, X_, RevBytes( Value_ ) );
361
end;
362

363
function TMatrixFlo8.GetTexts( const Y_,X_:Integer ) :String;
364
begin
365
     Result := Values[ Y_, X_ ].ToString;
366
end;
367

368
procedure TMatrixFlo8.SetTexts( const Y_,X_:Integer; const Text_:String );
369
begin
370
     if Text_ = 'nan' then Values[ Y_, X_ ] := Double.NaN
371
                      else Values[ Y_, X_ ] := Text_.ToDouble;
372
end;
373

374
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
375

376
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixInt1
377

378
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
379

380
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
381

382
/////////////////////////////////////////////////////////////////////// アクセス
383

384
function TMatrixInt1.GetTexts( const Y_,X_:Integer ) :String;
385
begin
386
     Result := Values[ Y_, X_ ].ToString;
387
end;
388

389
procedure TMatrixInt1.SetTexts( const Y_,X_:Integer; const Text_:String );
390
begin
391
     Values[ Y_, X_ ] := Text_.ToInteger;
392
end;
393

394
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
395

396
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixInt2
397

398
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
399

400
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
401

402
/////////////////////////////////////////////////////////////////////// アクセス
403

404
function TMatrixInt2.GetValues( const Y_,X_:Integer ) :Int16;
405
begin
406
     Result := RevBytes( inherited GetValues( Y_, X_ ) );
407
end;
408

409
procedure TMatrixInt2.SetValues( const Y_,X_:Integer; const Value_:Int16 );
410
begin
411
     inherited SetValues( Y_, X_, RevBytes( Value_ ) );
412
end;
413

414
function TMatrixInt2.GetTexts( const Y_,X_:Integer ) :String;
415
begin
416
     Result := Values[ Y_, X_ ].ToString;
417
end;
418

419
procedure TMatrixInt2.SetTexts( const Y_,X_:Integer; const Text_:String );
420
begin
421
     Values[ Y_, X_ ] := Text_.ToInteger;
422
end;
423

424
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
425

426
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixInt4
427

428
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
429

430
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
431

432
/////////////////////////////////////////////////////////////////////// アクセス
433

434
function TMatrixInt4.GetValues( const Y_,X_:Integer ) :Int32;
435
begin
436
     Result := RevBytes( inherited GetValues( Y_, X_ ) );
437
end;
438

439
procedure TMatrixInt4.SetValues( const Y_,X_:Integer; const Value_:Int32 );
440
begin
441
     inherited SetValues( Y_, X_, RevBytes( Value_ ) );
442
end;
443

444
function TMatrixInt4.GetTexts( const Y_,X_:Integer ) :String;
445
begin
446
     Result := Values[ Y_, X_ ].ToString;
447
end;
448

449
procedure TMatrixInt4.SetTexts( const Y_,X_:Integer; const Text_:String );
450
begin
451
     Values[ Y_, X_ ] := Text_.ToInteger;
452
end;
453

454
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
455

456
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixInt8
457

458
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
459

460
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
461

462
/////////////////////////////////////////////////////////////////////// アクセス
463

464
function TMatrixInt8.GetValues( const Y_,X_:Integer ) :Int64;
465
begin
466
     Result := RevBytes( inherited GetValues( Y_, X_ ) );
467
end;
468

469
procedure TMatrixInt8.SetValues( const Y_,X_:Integer; const Value_:Int64 );
470
begin
471
     inherited SetValues( Y_, X_, RevBytes( Value_ ) );
472
end;
473

474
function TMatrixInt8.GetTexts( const Y_,X_:Integer ) :String;
475
begin
476
     Result := Values[ Y_, X_ ].ToString;
477
end;
478

479
procedure TMatrixInt8.SetTexts( const Y_,X_:Integer; const Text_:String );
480
begin
481
     Values[ Y_, X_ ] := Text_.ToInt64;
482
end;
483

484
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
485

486
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixUIn1
487

488
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
489

490
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
491

492
/////////////////////////////////////////////////////////////////////// アクセス
493

494
function TMatrixUIn1.GetTexts( const Y_,X_:Integer ) :String;
495
begin
496
     Result := Values[ Y_, X_ ].ToString;
497
end;
498

499
procedure TMatrixUIn1.SetTexts( const Y_,X_:Integer; const Text_:String );
500
begin
501
     Values[ Y_, X_ ] := Text_.ToInteger;
502
end;
503

504
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
505

506
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixUIn2
507

508
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
509

510
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
511

512
/////////////////////////////////////////////////////////////////////// アクセス
513

514
function TMatrixUIn2.GetValues( const Y_,X_:Integer ) :UInt16;
515
begin
516
     Result := RevBytes( inherited GetValues( Y_, X_ ) );
517
end;
518

519
procedure TMatrixUIn2.SetValues( const Y_,X_:Integer; const Value_:UInt16 );
520
begin
521
     inherited SetValues( Y_, X_, RevBytes( Value_ ) );
522
end;
523

524
function TMatrixUIn2.GetTexts( const Y_,X_:Integer ) :String;
525
begin
526
     Result := Values[ Y_, X_ ].ToString;
527
end;
528

529
procedure TMatrixUIn2.SetTexts( const Y_,X_:Integer; const Text_:String );
530
begin
531
     Values[ Y_, X_ ] := Text_.ToInteger;
532
end;
533

534
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
535

536
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixUIn4
537

538
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
539

540
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
541

542
/////////////////////////////////////////////////////////////////////// アクセス
543

544
function TMatrixUIn4.GetValues( const Y_,X_:Integer ) :UInt32;
545
begin
546
     Result := RevBytes( inherited GetValues( Y_, X_ ) );
547
end;
548

549
procedure TMatrixUIn4.SetValues( const Y_,X_:Integer; const Value_:UInt32 );
550
begin
551
     inherited SetValues( Y_, X_, RevBytes( Value_ ) );
552
end;
553

554
function TMatrixUIn4.GetTexts( const Y_,X_:Integer ) :String;
555
begin
556
     Result := Values[ Y_, X_ ].ToString;
557
end;
558

559
procedure TMatrixUIn4.SetTexts( const Y_,X_:Integer; const Text_:String );
560
begin
561
     Values[ Y_, X_ ] := Text_.ToInteger;
562
end;
563

564
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
565

566
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TMatrixUIn8
567

568
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& private
569

570
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& protected
571

572
/////////////////////////////////////////////////////////////////////// アクセス
573

574
function TMatrixUIn8.GetValues( const Y_,X_:Integer ) :UInt64;
575
begin
576
     Result := RevBytes( inherited GetValues( Y_, X_ ) );
577
end;
578

579
procedure TMatrixUIn8.SetValues( const Y_,X_:Integer; const Value_:UInt64 );
580
begin
581
     inherited SetValues( Y_, X_, RevBytes( Value_ ) );
582
end;
583

584
function TMatrixUIn8.GetTexts( const Y_,X_:Integer ) :String;
585
begin
586
     Result := Values[ Y_, X_ ].ToString;
587
end;
588

589
procedure TMatrixUIn8.SetTexts( const Y_,X_:Integer; const Text_:String );
590
begin
591
     Values[ Y_, X_ ] := Text_.ToInt64;
592
end;
593

594
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& public
595

596
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$【ルーチン】
597

598
//############################################################################## □
599

600
initialization //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 初期化
601

602
finalization //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ 最終化
603

604
end. //######################################################################### ■
605

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.