summaryrefslogtreecommitdiff
path: root/fpcdocs/streamio.xml
blob: 632c50b80d030cd9a88bcdd0e5e3c8a02414d8f0 (plain)
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<fpdoc-descriptions>
<package name="fcl">

<!--
  ====================================================================
    StreamIO
  ====================================================================
-->

<module name="StreamIO">
<short>Streams for standard text files.</short>
<descr>
<p>
The <file>StreamIO</file> unit implements a call to reroute the input or
output of a text file to a descendents of <link id="#rtl.classes.TStream">TStream</link>.
</p>
<p>This allows to use the standard pascal <link id="#rtl.system.read">Read</link> 
and <link id="#rtl.system.write">Write</link> functions (with all their possibilities), 
on streams.
</p>
</descr>

<!-- unresolved type reference Visibility: default -->
<element name="Classes">
<short>For the definition of <var>TStream</var></short>
</element>
<element name="SysUtils">
<short>For exception support</short>
</element>

<!-- procedure Visibility: default -->
<element name="AssignStream">
<short>Assign a text file to a stream.</short>
<descr>
<p>
<var>AssignStream</var> assigns the stream <var>Stream</var> to file
<var>F</var>. The file can subsequently be used to write to the stream,
using the standard <link id="#rtl.system.write">Write</link> calls.
</p>
<p>
Before writing, call <link id="#rtl.system.rewrite">Rewrite</link> on
the stream. Before reading, call <link id="#rtl.system.reset">Reset</link>.
</p>
</descr>
<errors>
if <var>Stream</var> is <var>Nil</var>, an exception will be raised.
</errors>
<seealso>
<link id="#rtl.classes.TStream">TStream</link>
<link id="GetStream"/>
</seealso>
</element>

<!-- argument Visibility: default -->
<element name="AssignStream.F">
<short>The file one wishes to reroute through a stream.</short>
</element>

<!-- argument Visibility: default -->
<element name="AssignStream.Stream">
<short>The stream that should perform the actual I/O.</short>
</element>

<!-- function Visibility: default -->
<element name="GetStream">
<short>Return the stream, associated with a file.</short>
<descr>
<var>GetStream</var> returns the instance of the stream that
was associated with the file <var>F</var> using <link id="AssignStream"/>.
</descr>
<errors>
An invalid class reference will be returned if the file was not associated
with a stream.
</errors>
<seealso>
<link id="AssignStream"/>
<link id="#rtl.classes.TStream">TStream</link>
</seealso>
</element>

<!-- function result Visibility: default -->
<element name="GetStream.Result">
<short>The stream assigned to the file.</short>
</element>

<!-- argument Visibility: default -->
<element name="GetStream.F">
<short>The file one wishes to get the stream from.</short>
</element>

<!-- unresolved type reference Visibility: default -->
<element name="Classes">
<short>Stream definitions</short>
</element>

<!-- unresolved type reference Visibility: default -->
<element name="SysUtils">
<short>Exception support</short>
</element>

</module> <!-- StreamIO -->
</package>
</fpdoc-descriptions>