-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfiforam.pas
More file actions
70 lines (53 loc) · 1.62 KB
/
fiforam.pas
File metadata and controls
70 lines (53 loc) · 1.62 KB
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
{
/***************************************************************************
fiforam.pas
-----------
***************************************************************************/
*****************************************************************************
This file is part of the Lazarus packages by Andreas Jakobsche
See the file COPYING.modifiedLGPL.txt, included in this distribution,
for details about the license.
*****************************************************************************
}
{ |Subversion-Dokumentation
|------------------------
|$Date: 2018-01-08 15:28:51 +0100 (Mo, 08 Jan 2018) $ (letzter Aenderungszeitpunkt)
|$Revision: 2607 $ (letzter geaenderte Revision)
|$Author: andreas $ (letzter Autor)
|$HeadURL: svn://martina:3691/Lazarus/packages/streams/fiforam.pas $ (Archivadresse)
|$Id: fiforam.pas 2607 2018-01-08 14:28:51Z andreas $ (eindeutige Dateikennzeichnung)
}
unit FIFORAM;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FIFOBuff;
type
{ TFIFORAM }
TFIFORAM = class(TFIFOBuffer)
private
FA, FB: TMemoryStream;
protected
function GetA: TStream; override;
function GetB: TStream; override;
public
destructor Destroy; override;
end;
implementation
{ TFIFORAM }
function TFIFORAM.GetA: TStream;
begin
if not Assigned(FA) then FA := TMemoryStream.Create;
Result := FA
end;
function TFIFORAM.GetB: TStream;
begin
if not Assigned(FB) then FB := TMemoryStream.Create;
Result := FB;
end;
destructor TFIFORAM.Destroy;
begin
FA.Free; FB.Free;
inherited Destroy;
end;
end.