• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4    <TITLE>Iostreams Quick Reference</TITLE>
5    <LINK REL="stylesheet" HREF="../../../boost.css">
6    <LINK REL="stylesheet" HREF="theme/iostreams.css">
7<STYLE>
8    DT A { /*text-decoration:none*/ }
9    LI A { /*text-decoration:none;*/ font: 80% Verdana, Tahoma, Arial, Helvetica, sans-serif }
10</STYLE>
11</HEAD>
12<BODY>
13
14<!-- Begin Banner -->
15
16    <H1 CLASS="title">Quick Reference</H1>
17    <HR STYLE="margin-bottom:1em">
18
19<!-- End Banner -->
20
21<DL CLASS="page-index">
22  <DT><A href="#core">Core Components</A></DT>
23  <DT><A href="#devices">Devices</A></DT>
24  <DT><A href="#filters">Filters</A></DT>
25  <DT><A href="#algorithms">Algorithms</A></DT>
26  <DT><A href="#views">Views</A></DT>
27</DL>
28
29<HR STYLE="margin-top:1em">
30
31<!-- -------------- Core Components -------------- -->
32
33<A NAME='core'></A>
34<H2>Core Components</H2>
35
36<P>These components form the interface between Boost.Iostreams and the standard iostreams library.</P>
37
38<TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
39<TR>
40    <TH>Name</TH>
41    <TH>Header<A STYLE='font-weight:normal' CLASS='footnote_ref' NAME='note_1_ref' HREF="#note_1"><SUP>[1]</SUP></A></TH>
42    <TH>Description</TH>
43</TR>
44<TR>
45    <TD><A HREF="guide/generic_streams.html#stream"><CODE>stream</CODE></A></TD>
46    <TD><A HREF="../../../boost/iostreams/stream.hpp"><CODE>stream.hpp</CODE></A></TD>
47    <TD>
48        Stream template which performs i/o using an instance of its first template parameter, which must model the concept <A HREF="concepts/device.html">Device</A>. Derives from <CODE>std::basic_istream</CODE>, <CODE>std::basic_ostream</CODE> or <CODE>std::basic_iostream</CODE> depending on whether its first template parameter models <A HREF="concepts/source.html">Source</A>, <A HREF="concepts/sink.html">Sink</A> or both.
49    </TD>
50</TR>
51<TR>
52    <TD><A HREF="guide/generic_streams.html#stream_buffer"><CODE>stream_buffer</CODE></A></TD>
53    <TD><A HREF="../../../boost/iostreams/stream_buffer.hpp"><CODE>stream_buffer.hpp</CODE></A></TD>
54    <TD>
55        Stream buffer template which performs i/o using an instance of its first template parameter, which must model the concept <A HREF="concepts/device.html">Device</A>.
56    </TD>
57</TR>
58<TR>
59    <TD><A HREF="classes/filtering_stream.html"><CODE>filtering_stream</CODE></A></TD>
60    <TD><A HREF="../../../boost/iostreams/filtering_stream.hpp"><CODE>filtering_stream.hpp</CODE></A></TD>
61    <TD>
62        Stream template which performs filtered i/o using a contained <A HREF="classes/chain.html"><CODE>chain</CODE></A>. Derives from <CODE>std::basic_istream</CODE>, <CODE>std::basic_ostream</CODE> or <CODE>std::basic_iostream</CODE> depending on its <A HREF="guide/modes.html">mode</A>, which is specified as its first template parameter.
63    </TD>
64</TR>
65<TR>
66    <TD><A HREF="classes/filtering_streambuf.html"><CODE>filtering_streambuf</CODE></A></TD>
67    <TD><A HREF="../../../boost/iostreams/filtering_streambuf.hpp"><CODE>filtering_streambuf.hpp</CODE></A></TD>
68    <TD>
69        Stream buffer template which performs filtered i/o using a contained <A HREF="classes/chain.html"><CODE>chain</CODE></A>.
70    </TD>
71</TR>
72<TR>
73    <TD><A HREF="classes/chain.html"><CODE>chain</CODE></A></TD>
74    <TD><A HREF="../../../boost/iostreams/chain.hpp"><CODE>chain.hpp</CODE></A></TD>
75    <TD>
76        Sequence of zero or more <A HREF="concepts/filter.html">Filters</A>, followed by an optional <A HREF="concepts/device.html">Device</A>, accessed with a stack-like interface. Used by <A HREF="classes/filtering_stream.html"><CODE>filtering_stream</CODE></A> and <A HREF="classes/filtering_streambuf.html"><CODE>filtering_streambuf</CODE></A>.
77    </TD>
78</TR>
79<TR>
80    <TD><A HREF="classes/code_converter.html"><CODE>code_converter</CODE></A></TD>
81    <TD><A HREF="../../../boost/iostreams/code_converter.hpp"><CODE>code_converter.hpp</CODE></A></TD>
82    <TD>
83        Device adapter which takes a narrow-character <A HREF="concepts/device.html">Device</A> and produces a wide-character <A HREF="concepts/device.html">Device</A> by introducing a layer of <A HREF="guide/code_conversion.html">code conversion</A>.
84    </TD>
85</TR>
86</TABLE>
87
88<!-- -------------- Devices -------------- -->
89
90<A NAME='devices'></A>
91<H2>Devices</H2>
92
93<TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
94<TR>
95    <TH>Device</TH>
96    <TH>Header<A STYLE='font-weight:normal' CLASS='footnote_ref' NAME='note_2_ref' HREF="#note_2"><SUP>[2]</SUP></A></TH>
97    <TH>Description</TH>
98</TR>
99<TR>
100    <TD>
101        <A HREF="classes/array.html#array_source"><CODE>basic_array_source</CODE></A>,<BR>
102        <A HREF="classes/array.html#array_sink"><CODE>basic_array_sink</CODE></A>,<BR>
103        <A HREF="classes/array.html#array"><CODE>basic_array</CODE></A>
104    </TD>
105    <TD><A HREF="../../../boost/iostreams/device/array.hpp"><CODE>array.hpp</CODE></A></TD>
106    <TD>
107        Accesses a in-memory character sequence.
108    </TD>
109</TR>
110<TR>
111    <TD>
112        <A HREF="classes/back_inserter.html#synopsis"><CODE>back_insert_device</CODE></A>
113    </TD>
114    <TD><A HREF="../../../boost/iostreams/device/back_inserter.hpp"><CODE>back_inserter.hpp</CODE></A></TD>
115    <TD>
116        Appends to an STL sequence.
117    </TD>
118</TR>
119<TR>
120    <TD>
121        <A HREF="classes/file.html#file_source"><CODE>basic_file_source</CODE></A>,<BR>
122        <A HREF="classes/file.html#file_sink"><CODE>basic_file_sink</CODE></A>,<BR>
123        <A HREF="classes/file.html#file"><CODE>basic_file</CODE></A>
124    </TD>
125    <TD><A HREF="../../../boost/iostreams/device/file.hpp"><CODE>file.hpp</CODE></A></TD>
126    <TD>
127        Accesses the filesystem using a <CODE>std::basic_filebuf</CODE>.
128    </TD>
129</TR>
130<TR>
131    <TD>
132        <A HREF="classes/null.html#null_source"><CODE>basic_null_source</CODE></A>
133    </TD>
134    <TD ROWSPAN=2><A HREF="../../../boost/iostreams/device/null.hpp"><CODE>null.hpp</CODE></A></TD>
135    <TD>
136        Reads characters from an empty sequence.
137    </TD>
138</TR>
139<TR>
140    <TD>
141        <A HREF="classes/null.html#null_sink"><CODE>basic_null_sink</CODE></A>
142    </TD>
143    <TD>
144        Consumes and ignores characters.
145    </TD>
146</TR>
147<TR>
148    <TD>
149        <A HREF="classes/file_descriptor.html#file_descriptor_source"><CODE>file_descriptor_source</CODE></A>,<BR>
150        <A HREF="classes/file_descriptor.html#file_descriptor_sink"><CODE>file_descriptor_sink</CODE></A>,<BR>
151        <A HREF="classes/file_descriptor.html#file_descriptor"><CODE>file_descriptor</CODE></A>
152    </TD>
153    <TD><A HREF="../../../boost/iostreams/device/file_descriptor.hpp"><CODE>file_descriptor.hpp</CODE></A></TD>
154    <TD>
155        Accesses the filesystem using an operating system file descriptor or file handle.
156    </TD>
157</TR>
158<TR>
159    <TD>
160        <A HREF="classes/mapped_file.html#mapped_file_source"><CODE>mapped_file_source</CODE></A>,<BR>
161        <A HREF="classes/mapped_file.html#mapped_file_sink"><CODE>mapped_file_sink</CODE></A>,<BR>
162        <A HREF="classes/mapped_file.html#mapped_file"><CODE>mapped_file</CODE></A>
163    </TD>
164    <TD><A HREF="../../../boost/iostreams/device/mapped_file.hpp"><CODE>mapped_file.hpp</CODE></A></TD>
165    <TD>
166        Accesses a memory-mapped file.
167    </TD>
168</TR>
169</TABLE>
170
171<!-- -------------- Filters -------------- -->
172
173<A NAME='filters'></A>
174<H2>Filters</H2>
175
176<TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
177<TR>
178    <TH>Category</TH>
179    <TH>Filter</TH>
180    <TH>Header<A STYLE='font-weight:normal' CLASS='footnote_ref' NAME='note_3_ref' HREF="#note_3"><SUP>[3]</SUP></A></TH>
181    <TH>Description</TH>
182</TR>
183
184<!-- -------------- Compression -------------- -->
185
186<TR>
187    <TH ROWSPAN=3>Compression</TH>
188    <TD>
189        <A HREF="classes/bzip2.html#basic_bzip2_compressor"><CODE>basic_bzip2_compressor</CODE></A>,<BR>
190        <A HREF="classes/bzip2.html#basic_bzip2_decompressor"><CODE>basic_bzip2_decompressor</CODE></A>
191    </TD>
192    <TD><A HREF="../../../boost/iostreams/filter/bzip2.hpp"><CODE>bzip2.hpp</CODE></A></TD>
193    <TD>
194        Perform compression and decompression using the libbzip2 data compression library (<A CLASS='bib_ref' HREF="bibliography.html#seward">[Seward]</A>).
195    </TD>
196</TR>
197<TR>
198    <TD>
199        <A HREF="classes/gzip.html#basic_gzip_compressor"><CODE>basic_gzip_compressor</CODE></A>,<BR>
200        <A HREF="classes/gzip.html#basic_gzip_decompressor"><CODE>basic_gzip_decompressor</CODE></A>
201    </TD>
202    <TD><A HREF="../../../boost/iostreams/filter/gzip.hpp"><CODE>gzip.hpp</CODE></A></TD>
203    <TD>
204        Perform compression and decompression based on the the G<SPAN STYLE="font-size:80%">ZIP</SPAN> format (<A CLASS="bib_ref" HREF="bibliography.html#deutsch3">[Deutsch3]</A>).
205    </TD>
206</TR>
207<TR>
208    <TD>
209        <A HREF="classes/zlib.html#basic_zlib_compressor"><CODE>basic_zlib_compressor</CODE></A>,<BR>
210        <A HREF="classes/zlib.html#basic_zlib_decompressor"><CODE>basic_zlib_decompressor</CODE></A>
211    </TD>
212    <TD><A HREF="../../../boost/iostreams/filter/zlib.hpp"><CODE>zlib.hpp</CODE></A></TD>
213    <TD>
214        Perform compression and decompression using the zlib data compression library (<A CLASS='bib_ref' HREF="bibliography.html#gailly">[Gailly]</A>).
215    </TD>
216</TR>
217
218<!-- -------------- Text -------------- -->
219
220<TR>
221    <TH ROWSPAN=5>Text</TH>
222    <TD>
223        <A HREF="classes/counter.html"><CODE>basic_counter</CODE></A>
224    </TD>
225    <TD><A HREF="../../../boost/iostreams/filter/counter.hpp"><CODE>counter.hpp</CODE></A></TD>
226    <TD>
227        Maintains a character and line count.
228    </TD>
229</TR>
230<TR>
231    <TD>
232        <A HREF="classes/regex_filter.html"><CODE>basic_regex_filter</CODE></A>
233    </TD>
234    <TD><A HREF="../../../boost/iostreams/filter/regex.hpp"><CODE>regex.hpp</CODE></A></TD>
235    <TD>
236        Performs text substitutions using regular expressions from the <A HREF="http://www.boost.org/libs/regex" TARGET="_top">Boost Regular Expression Library</A>.
237    </TD>
238</TR>
239<TR>
240    <TD>
241        <A HREF="classes/grep_filter.html"><CODE>basic_grep_filter</CODE></A>
242    </TD>
243    <TD><A HREF="../../../boost/iostreams/filter/grep.hpp"><CODE>grep.hpp</CODE></A></TD>
244    <TD>
245        Filters character sequences line by line using regular expressions from the  <A HREF="http://www.boost.org/libs/regex" TARGET="_top">Boost Regular Expression Library</A>.
246    </TD>
247</TR>
248<TR>
249    <TD>
250        <A HREF="classes/newline_filter.html#newline_checker"><CODE>newline_checker</CODE></A>
251    </TD>
252    <TD ROWSPAN=2><A HREF="../../../boost/iostreams/filter/newline.hpp"><CODE>newline.hpp</CODE></A></TD>
253    <TD>
254        Verifies that a character sequence conforms to a given line-ending convention.
255    </TD>
256</TR>
257<TR>
258    <TD>
259        <A HREF="classes/newline_filter.html#newline_filter"><CODE>newline_filter</CODE></A>
260    </TD>
261    <TD>
262        Converts between the line-ending conventions used by various operating systems.
263    </TD>
264</TR>
265
266<!-- -------------- Helpers -------------- -->
267
268<TR>
269    <TH ROWSPAN=4>Helpers</TH>
270    <TD>
271        <A HREF="classes/line_filter.html"><CODE>basic_line_filter</CODE></A>
272    </TD>
273    <TD><A HREF="../../../boost/iostreams/filter/line.hpp"><CODE>line.hpp</CODE></A></TD>
274    <TD>
275        Filters a character sequence one line at a time.
276    </TD>
277</TR>
278<TR>
279    <TD>
280        <A HREF="classes/stdio_filter.html"><CODE>basic_stdio_filter</CODE></A>
281    </TD>
282    <TD><A HREF="../../../boost/iostreams/filter/stdio.hpp"><CODE>stdio.hpp</CODE></A></TD>
283    <TD>
284         Filters by reading from standard input and writing to standard output.
285    </TD>
286</TR>
287<TR>
288    <TD>
289        <A HREF="classes/aggregate.html"><CODE>aggregate_filter</CODE></A>
290    </TD>
291    <TD><A HREF="../../../boost/iostreams/filter/aggregate.hpp"><CODE>aggregate.hpp</CODE></A></TD>
292    <TD>
293         Filters an entire character sequence at once.
294    </TD>
295</TR>
296<TR>
297    <TD>
298        <A HREF="classes/symmetric_filter.html"><CODE>symmetric_filter</CODE></A>
299    </TD>
300    <TD><A HREF="../../../boost/iostreams/filter/symmetric.hpp"><CODE>symmetric.hpp</CODE></A></TD>
301    <TD>
302         Filters using a model of <A HREF="concepts/symmetric_filter.html">SymmetricFilter</A>.
303    </TD>
304</TR>
305</TABLE>
306
307<!-- -------------- Algorithms -------------- -->
308
309<A NAME='algorithms'></A>
310<H2>Algorithms</H2>
311
312<TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
313<TR>
314    <TH>Algorithm</TH>
315    <TH>Header</TH>
316    <TH>Description</TH>
317</TR>
318<TR>
319    <TD>
320        <A HREF="functions/copy.html"><CODE>copy</CODE></A>
321    </TD>
322    <TD><A HREF="../../../boost/iostreams/copy.hpp"><CODE>boost/iostreams/copy.hpp</CODE></A></TD>
323    <TD>
324        <P>Reads characters from a <A HREF="concepts/source.html">Source</A> and writes them to a <A HREF="concepts/sink.html">Sink</A> until the end of stream is reached; returns the number of characters written.</P>
325    </TD>
326</TR>
327</TABLE>
328
329<!-- -------------- Views -------------- -->
330
331<A NAME='views'></A>
332<H2>Views</H2>
333
334<P>
335    Each view consists of one or more class templates together with an <A HREF="http://www.boost.org/more/generic_programming.html#object_generator" TARGET="_top">object generator</A>. <I>See</I> <A HREF="guide/views.html">Views</A>.
336</P>
337
338<TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
339<TR>
340    <TH>Object Generator</TH>
341    <TH>View Template</TH>
342    <TH>Header<A STYLE='font-weight:normal' CLASS='footnote_ref' NAME='note_1_ref2' HREF="#note_1"><SUP>[1]</SUP></A></TH>
343    <TH>Description</TH>
344</TR>
345<TR>
346    <TD><A HREF="functions/combine.html"><CODE>combine</CODE></A></TD>
347    <TD><A HREF="functions/combine.html#synopsis"><CODE>combination</CODE></A></TD>
348    <TD><A HREF="../../../boost/iostreams/combine.hpp"><CODE>combine.hpp</CODE></A></TD>
349    <TD>
350        Takes a pair of <A HREF="concepts/filter.html">Filters</A> or <A HREF="concepts/device.html">Devices</A> and yields a filter or device which performs input using the first component and output using the second.
351    </TD>
352</TR>
353<TR>
354    <TD><A HREF="functions/compose.html"><CODE>compose</CODE></A></TD>
355    <TD><A HREF="functions/compose.html#composite"><CODE>composite</CODE></A></TD>
356    <TD><A HREF="../../../boost/iostreams/compose.hpp"><CODE>compose.hpp</CODE></A></TD>
357    <TD>
358        Takes a <A HREF="concepts/filter.html">Filter</A> and either a second <A HREF="concepts/filter.html">Filter</A> or a <A HREF="concepts/device.html">Device</A> and yields a Filter or Device whose output flows through the two components in order and whose input flows flows through the two components in reverse order.
359    </TD>
360</TR>
361<TR>
362    <TD><A HREF="functions/invert.html"><CODE>invert</CODE></A></TD>
363    <TD><A HREF="functions/invert.html#inverse"><CODE>inverse</CODE></A></TD>
364    <TD><A HREF="../../../boost/iostreams/invert.hpp"><CODE>invert.hpp</CODE></A></TD>
365    <TD>
366        Takes a <A HREF="concepts/filter.html">Filter</A> and yields a Filter that performs the same filtering algorithm but is an <A HREF="concepts/output_filter.html">OutputFilter</A> if the given component is an <A HREF="concepts/input_filter.html">InputFilter</A>, and an <A HREF="concepts/input_filter.html">InputFilter</A> otherwise.
367    </TD>
368</TR>
369<TR>
370    <TD><A HREF="functions/restrict.html"><CODE>restrict</CODE></A><BR><A HREF="functions/slice.html"><CODE>slice</CODE></A></TD>
371    <TD><A HREF="functions/restrict.html#restriction"><CODE>restriction</CODE></A></TD>
372    <TD><A HREF="../../../boost/iostreams/restrict.hpp"><CODE>restrict.hpp</CODE></A><BR><A HREF="../../../boost/iostreams/slice.hpp"><CODE>slice.hpp</CODE></A></TD>
373    <TD>
374        Takes a <A HREF="concepts/filter.html">Filter</A> or <A HREF="concepts/device.html">Device</A> together with a stream offset and an optional length and yields a <A HREF="concepts/filter.html">Filter</A> or <A HREF="concepts/device.html">Device</A> for accessing the specifed subquence of the given component
375    </TD>
376</TR>
377<TR>
378    <TD ROWSPAN='2'><A HREF="functions/tee.html"><CODE>tee</CODE></A></TD>
379    <TD>
380        <A HREF="functions/tee.html#tee_device"><CODE>tee_device</CODE></A>
381    </TD>
382    <TD ROWSPAN='2'><A HREF="../../../boost/iostreams/tee.hpp"><CODE>tee.hpp</CODE></A></TD>
383    <TD>
384        Takes a pair of <A HREF="concepts/sink.html">Sinks</A> and yields a Sink which sends all incoming data to both of the given Sinks.
385    </TD>
386</TR>
387<TR>
388    <TD>
389        <A HREF="functions/tee.html#tee_filter"><CODE>tee_filter</CODE></A>
390    </TD>
391    <TD>
392        Takes a <A HREF="concepts/filter.html">Filter</A> and a <A HREF="concepts/sink.html">Sink</A> and yields a Filter which sends all outgoing data to the Sink in addition to passing it downsteam.
393    </TD>
394</TR>
395</TABLE>
396
397<!-- Begin Footnotes -->
398
399<H4>Notes</H4>
400
401<P>
402    <A CLASS="footnote_ref" NAME="note_1" HREF="#note_1_ref"><SUP>[1]</SUP></A>Pathnames should be interpreted relative to the directory <CODE>boost/iostreams</CODE>.
403</P>
404
405<P>
406    <A CLASS="footnote_ref" NAME="note_2" HREF="#note_2_ref"><SUP>[2]</SUP></A>Pathnames should be interpreted relative to the directory <CODE>boost/iostreams/device</CODE>.
407</P>
408
409<P>
410    <A CLASS="footnote_ref" NAME="note_3" HREF="#note_3_ref"><SUP>[3]</SUP></A>Pathnames should be interpreted relative to the directory <CODE>boost/iostreams/filter</CODE>.
411</P>
412
413<!-- End Footnotes -->
414
415<!-- Begin Footer -->
416
417
418<P CLASS="copyright">&copy; Copyright 2008 <a href="http://www.coderage.com/" target="_top">CodeRage, LLC</a><br/>&copy; Copyright 2004-2007 <a href="https://www.boost.org/users/people/jonathan_turkanis.html" target="_top">Jonathan Turkanis</a><br/>Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <A HREF="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)
419</P>
420
421<!-- End Footer -->
422
423</BODY>
424