quick_reference.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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. <!-- Begin Banner -->
  14. <H1 CLASS="title">Quick Reference</H1>
  15. <HR STYLE="margin-bottom:1em">
  16. <!-- End Banner -->
  17. <DL CLASS="page-index">
  18. <DT><A href="#core">Core Components</A></DT>
  19. <DT><A href="#devices">Devices</A></DT>
  20. <DT><A href="#filters">Filters</A></DT>
  21. <DT><A href="#algorithms">Algorithms</A></DT>
  22. <DT><A href="#views">Views</A></DT>
  23. </DL>
  24. <HR STYLE="margin-top:1em">
  25. <!-- -------------- Core Components -------------- -->
  26. <A NAME='core'></A>
  27. <H2>Core Components</H2>
  28. <P>These components form the interface between Boost.Iostreams and the standard iostreams library.</P>
  29. <TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
  30. <TR>
  31. <TH>Name</TH>
  32. <TH>Header<A STYLE='font-weight:normal' CLASS='footnote_ref' NAME='note_1_ref' HREF="#note_1"><SUP>[1]</SUP></A></TH>
  33. <TH>Description</TH>
  34. </TR>
  35. <TR>
  36. <TD><A HREF="guide/generic_streams.html#stream"><CODE>stream</CODE></A></TD>
  37. <TD><A HREF="../../../boost/iostreams/stream.hpp"><CODE>stream.hpp</CODE></A></TD>
  38. <TD>
  39. 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.
  40. </TD>
  41. </TR>
  42. <TR>
  43. <TD><A HREF="guide/generic_streams.html#stream_buffer"><CODE>stream_buffer</CODE></A></TD>
  44. <TD><A HREF="../../../boost/iostreams/stream_buffer.hpp"><CODE>stream_buffer.hpp</CODE></A></TD>
  45. <TD>
  46. 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>.
  47. </TD>
  48. </TR>
  49. <TR>
  50. <TD><A HREF="classes/filtering_stream.html"><CODE>filtering_stream</CODE></A></TD>
  51. <TD><A HREF="../../../boost/iostreams/filtering_stream.hpp"><CODE>filtering_stream.hpp</CODE></A></TD>
  52. <TD>
  53. 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.
  54. </TD>
  55. </TR>
  56. <TR>
  57. <TD><A HREF="classes/filtering_streambuf.html"><CODE>filtering_streambuf</CODE></A></TD>
  58. <TD><A HREF="../../../boost/iostreams/filtering_streambuf.hpp"><CODE>filtering_streambuf.hpp</CODE></A></TD>
  59. <TD>
  60. Stream buffer template which performs filtered i/o using a contained <A HREF="classes/chain.html"><CODE>chain</CODE></A>.
  61. </TD>
  62. </TR>
  63. <TR>
  64. <TD><A HREF="classes/chain.html"><CODE>chain</CODE></A></TD>
  65. <TD><A HREF="../../../boost/iostreams/chain.hpp"><CODE>chain.hpp</CODE></A></TD>
  66. <TD>
  67. 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>.
  68. </TD>
  69. </TR>
  70. <TR>
  71. <TD><A HREF="classes/code_converter.html"><CODE>code_converter</CODE></A></TD>
  72. <TD><A HREF="../../../boost/iostreams/code_converter.hpp"><CODE>code_converter.hpp</CODE></A></TD>
  73. <TD>
  74. 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>.
  75. </TD>
  76. </TR>
  77. </TABLE>
  78. <!-- -------------- Devices -------------- -->
  79. <A NAME='devices'></A>
  80. <H2>Devices</H2>
  81. <TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
  82. <TR>
  83. <TH>Device</TH>
  84. <TH>Header<A STYLE='font-weight:normal' CLASS='footnote_ref' NAME='note_2_ref' HREF="#note_2"><SUP>[2]</SUP></A></TH>
  85. <TH>Description</TH>
  86. </TR>
  87. <TR>
  88. <TD>
  89. <A HREF="classes/array.html#array_source"><CODE>basic_array_source</CODE></A>,<BR>
  90. <A HREF="classes/array.html#array_sink"><CODE>basic_array_sink</CODE></A>,<BR>
  91. <A HREF="classes/array.html#array"><CODE>basic_array</CODE></A>
  92. </TD>
  93. <TD><A HREF="../../../boost/iostreams/device/array.hpp"><CODE>array.hpp</CODE></A></TD>
  94. <TD>
  95. Accesses a in-memory character sequence.
  96. </TD>
  97. </TR>
  98. <TR>
  99. <TD>
  100. <A HREF="classes/back_inserter.html#synopsis"><CODE>back_insert_device</CODE></A>
  101. </TD>
  102. <TD><A HREF="../../../boost/iostreams/device/back_inserter.hpp"><CODE>back_inserter.hpp</CODE></A></TD>
  103. <TD>
  104. Appends to an STL sequence.
  105. </TD>
  106. </TR>
  107. <TR>
  108. <TD>
  109. <A HREF="classes/file.html#file_source"><CODE>basic_file_source</CODE></A>,<BR>
  110. <A HREF="classes/file.html#file_sink"><CODE>basic_file_sink</CODE></A>,<BR>
  111. <A HREF="classes/file.html#file"><CODE>basic_file</CODE></A>
  112. </TD>
  113. <TD><A HREF="../../../boost/iostreams/device/file.hpp"><CODE>file.hpp</CODE></A></TD>
  114. <TD>
  115. Accesses the filesystem using a <CODE>std::basic_filebuf</CODE>.
  116. </TD>
  117. </TR>
  118. <TR>
  119. <TD>
  120. <A HREF="classes/null.html#null_source"><CODE>basic_null_source</CODE></A>
  121. </TD>
  122. <TD ROWSPAN=2><A HREF="../../../boost/iostreams/device/null.hpp"><CODE>null.hpp</CODE></A></TD>
  123. <TD>
  124. Reads characters from an empty sequence.
  125. </TD>
  126. </TR>
  127. <TR>
  128. <TD>
  129. <A HREF="classes/null.html#null_sink"><CODE>basic_null_sink</CODE></A>
  130. </TD>
  131. <TD>
  132. Consumes and ignores characters.
  133. </TD>
  134. </TR>
  135. <TR>
  136. <TD>
  137. <A HREF="classes/file_descriptor.html#file_descriptor_source"><CODE>file_descriptor_source</CODE></A>,<BR>
  138. <A HREF="classes/file_descriptor.html#file_descriptor_sink"><CODE>file_descriptor_sink</CODE></A>,<BR>
  139. <A HREF="classes/file_descriptor.html#file_descriptor"><CODE>file_descriptor</CODE></A>
  140. </TD>
  141. <TD><A HREF="../../../boost/iostreams/device/file_descriptor.hpp"><CODE>file_descriptor.hpp</CODE></A></TD>
  142. <TD>
  143. Accesses the filesystem using an operating system file descriptor or file handle.
  144. </TD>
  145. </TR>
  146. <TR>
  147. <TD>
  148. <A HREF="classes/mapped_file.html#mapped_file_source"><CODE>mapped_file_source</CODE></A>,<BR>
  149. <A HREF="classes/mapped_file.html#mapped_file_sink"><CODE>mapped_file_sink</CODE></A>,<BR>
  150. <A HREF="classes/mapped_file.html#mapped_file"><CODE>mapped_file</CODE></A>
  151. </TD>
  152. <TD><A HREF="../../../boost/iostreams/device/mapped_file.hpp"><CODE>mapped_file.hpp</CODE></A></TD>
  153. <TD>
  154. Accesses a memory-mapped file.
  155. </TD>
  156. </TR>
  157. </TABLE>
  158. <!-- -------------- Filters -------------- -->
  159. <A NAME='filters'></A>
  160. <H2>Filters</H2>
  161. <TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
  162. <TR>
  163. <TH>Category</TH>
  164. <TH>Filter</TH>
  165. <TH>Header<A STYLE='font-weight:normal' CLASS='footnote_ref' NAME='note_3_ref' HREF="#note_3"><SUP>[3]</SUP></A></TH>
  166. <TH>Description</TH>
  167. </TR>
  168. <!-- -------------- Compression -------------- -->
  169. <TR>
  170. <TH ROWSPAN=3>Compression</TH>
  171. <TD>
  172. <A HREF="classes/bzip2.html#basic_bzip2_compressor"><CODE>basic_bzip2_compressor</CODE></A>,<BR>
  173. <A HREF="classes/bzip2.html#basic_bzip2_decompressor"><CODE>basic_bzip2_decompressor</CODE></A>
  174. </TD>
  175. <TD><A HREF="../../../boost/iostreams/filter/bzip2.hpp"><CODE>bzip2.hpp</CODE></A></TD>
  176. <TD>
  177. Perform compression and decompression using the libbzip2 data compression library (<A CLASS='bib_ref' HREF="bibliography.html#seward">[Seward]</A>).
  178. </TD>
  179. </TR>
  180. <TR>
  181. <TD>
  182. <A HREF="classes/gzip.html#basic_gzip_compressor"><CODE>basic_gzip_compressor</CODE></A>,<BR>
  183. <A HREF="classes/gzip.html#basic_gzip_decompressor"><CODE>basic_gzip_decompressor</CODE></A>
  184. </TD>
  185. <TD><A HREF="../../../boost/iostreams/filter/gzip.hpp"><CODE>gzip.hpp</CODE></A></TD>
  186. <TD>
  187. 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>).
  188. </TD>
  189. </TR>
  190. <TR>
  191. <TD>
  192. <A HREF="classes/zlib.html#basic_zlib_compressor"><CODE>basic_zlib_compressor</CODE></A>,<BR>
  193. <A HREF="classes/zlib.html#basic_zlib_decompressor"><CODE>basic_zlib_decompressor</CODE></A>
  194. </TD>
  195. <TD><A HREF="../../../boost/iostreams/filter/zlib.hpp"><CODE>zlib.hpp</CODE></A></TD>
  196. <TD>
  197. Perform compression and decompression using the zlib data compression library (<A CLASS='bib_ref' HREF="bibliography.html#gailly">[Gailly]</A>).
  198. </TD>
  199. </TR>
  200. <!-- -------------- Text -------------- -->
  201. <TR>
  202. <TH ROWSPAN=5>Text</TH>
  203. <TD>
  204. <A HREF="classes/counter.html"><CODE>basic_counter</CODE></A>
  205. </TD>
  206. <TD><A HREF="../../../boost/iostreams/filter/counter.hpp"><CODE>counter.hpp</CODE></A></TD>
  207. <TD>
  208. Maintains a character and line count.
  209. </TD>
  210. </TR>
  211. <TR>
  212. <TD>
  213. <A HREF="classes/regex_filter.html"><CODE>basic_regex_filter</CODE></A>
  214. </TD>
  215. <TD><A HREF="../../../boost/iostreams/filter/regex.hpp"><CODE>regex.hpp</CODE></A></TD>
  216. <TD>
  217. Performs text substitutions using regular expressions from the <A HREF="http://www.boost.org/libs/regex" TARGET="_top">Boost Regular Expression Library</A>.
  218. </TD>
  219. </TR>
  220. <TR>
  221. <TD>
  222. <A HREF="classes/grep_filter.html"><CODE>basic_grep_filter</CODE></A>
  223. </TD>
  224. <TD><A HREF="../../../boost/iostreams/filter/grep.hpp"><CODE>grep.hpp</CODE></A></TD>
  225. <TD>
  226. 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>.
  227. </TD>
  228. </TR>
  229. <TR>
  230. <TD>
  231. <A HREF="classes/newline_filter.html#newline_checker"><CODE>newline_checker</CODE></A>
  232. </TD>
  233. <TD ROWSPAN=2><A HREF="../../../boost/iostreams/filter/newline.hpp"><CODE>newline.hpp</CODE></A></TD>
  234. <TD>
  235. Verifies that a character sequence conforms to a given line-ending convention.
  236. </TD>
  237. </TR>
  238. <TR>
  239. <TD>
  240. <A HREF="classes/newline_filter.html#newline_filter"><CODE>newline_filter</CODE></A>
  241. </TD>
  242. <TD>
  243. Converts between the line-ending conventions used by various operating systems.
  244. </TD>
  245. </TR>
  246. <!-- -------------- Helpers -------------- -->
  247. <TR>
  248. <TH ROWSPAN=4>Helpers</TH>
  249. <TD>
  250. <A HREF="classes/line_filter.html"><CODE>basic_line_filter</CODE></A>
  251. </TD>
  252. <TD><A HREF="../../../boost/iostreams/filter/line.hpp"><CODE>line.hpp</CODE></A></TD>
  253. <TD>
  254. Filters a character sequence one line at a time.
  255. </TD>
  256. </TR>
  257. <TR>
  258. <TD>
  259. <A HREF="classes/stdio_filter.html"><CODE>basic_stdio_filter</CODE></A>
  260. </TD>
  261. <TD><A HREF="../../../boost/iostreams/filter/stdio.hpp"><CODE>stdio.hpp</CODE></A></TD>
  262. <TD>
  263. Filters by reading from standard input and writing to standard output.
  264. </TD>
  265. </TR>
  266. <TR>
  267. <TD>
  268. <A HREF="classes/aggregate.html"><CODE>aggregate_filter</CODE></A>
  269. </TD>
  270. <TD><A HREF="../../../boost/iostreams/filter/aggregate.hpp"><CODE>aggregate.hpp</CODE></A></TD>
  271. <TD>
  272. Filters an entire character sequence at once.
  273. </TD>
  274. </TR>
  275. <TR>
  276. <TD>
  277. <A HREF="classes/symmetric_filter.html"><CODE>symmetric_filter</CODE></A>
  278. </TD>
  279. <TD><A HREF="../../../boost/iostreams/filter/symmetric.hpp"><CODE>symmetric.hpp</CODE></A></TD>
  280. <TD>
  281. Filters using a model of <A HREF="concepts/symmetric_filter.html">SymmetricFilter</A>.
  282. </TD>
  283. </TR>
  284. </TABLE>
  285. <!-- -------------- Algorithms -------------- -->
  286. <A NAME='algorithms'></A>
  287. <H2>Algorithms</H2>
  288. <TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
  289. <TR>
  290. <TH>Algorithm</TH>
  291. <TH>Header</TH>
  292. <TH>Description</TH>
  293. </TR>
  294. <TR>
  295. <TD>
  296. <A HREF="functions/copy.html"><CODE>copy</CODE></A>
  297. </TD>
  298. <TD><A HREF="../../../boost/iostreams/copy.hpp"><CODE>boost/iostreams/copy.hpp</CODE></A></TD>
  299. <TD>
  300. <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>
  301. </TD>
  302. </TR>
  303. </TABLE>
  304. <!-- -------------- Views -------------- -->
  305. <A NAME='views'></A>
  306. <H2>Views</H2>
  307. <P>
  308. 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>.
  309. </P>
  310. <TABLE STYLE="margin-bottom:1em" BORDER="1" CELLPADDING="6" CELLSPACING="1">
  311. <TR>
  312. <TH>Object Generator</TH>
  313. <TH>View Template</TH>
  314. <TH>Header<A STYLE='font-weight:normal' CLASS='footnote_ref' NAME='note_1_ref2' HREF="#note_1"><SUP>[1]</SUP></A></TH>
  315. <TH>Description</TH>
  316. </TR>
  317. <TR>
  318. <TD><A HREF="functions/combine.html"><CODE>combine</CODE></A></TD>
  319. <TD><A HREF="functions/combine.html#synopsis"><CODE>combination</CODE></A></TD>
  320. <TD><A HREF="../../../boost/iostreams/combine.hpp"><CODE>combine.hpp</CODE></A></TD>
  321. <TD>
  322. 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.
  323. </TD>
  324. </TR>
  325. <TR>
  326. <TD><A HREF="functions/compose.html"><CODE>compose</CODE></A></TD>
  327. <TD><A HREF="functions/compose.html#composite"><CODE>composite</CODE></A></TD>
  328. <TD><A HREF="../../../boost/iostreams/compose.hpp"><CODE>compose.hpp</CODE></A></TD>
  329. <TD>
  330. 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.
  331. </TD>
  332. </TR>
  333. <TR>
  334. <TD><A HREF="functions/invert.html"><CODE>invert</CODE></A></TD>
  335. <TD><A HREF="functions/invert.html#inverse"><CODE>inverse</CODE></A></TD>
  336. <TD><A HREF="../../../boost/iostreams/invert.hpp"><CODE>invert.hpp</CODE></A></TD>
  337. <TD>
  338. 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.
  339. </TD>
  340. </TR>
  341. <TR>
  342. <TD><A HREF="functions/restrict.html"><CODE>restrict</CODE></A><BR><A HREF="functions/slice.html"><CODE>slice</CODE></A></TD>
  343. <TD><A HREF="functions/restrict.html#restriction"><CODE>restriction</CODE></A></TD>
  344. <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>
  345. <TD>
  346. 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
  347. </TD>
  348. </TR>
  349. <TR>
  350. <TD ROWSPAN='2'><A HREF="functions/tee.html"><CODE>tee</CODE></A></TD>
  351. <TD>
  352. <A HREF="functions/tee.html#tee_device"><CODE>tee_device</CODE></A>
  353. </TD>
  354. <TD ROWSPAN='2'><A HREF="../../../boost/iostreams/tee.hpp"><CODE>tee.hpp</CODE></A></TD>
  355. <TD>
  356. 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.
  357. </TD>
  358. </TR>
  359. <TR>
  360. <TD>
  361. <A HREF="functions/tee.html#tee_filter"><CODE>tee_filter</CODE></A>
  362. </TD>
  363. <TD>
  364. 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.
  365. </TD>
  366. </TR>
  367. </TABLE>
  368. <!-- Begin Footnotes -->
  369. <H4>Notes</H4>
  370. <P>
  371. <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>.
  372. </P>
  373. <P>
  374. <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>.
  375. </P>
  376. <P>
  377. <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>.
  378. </P>
  379. <!-- End Footnotes -->
  380. <!-- Begin Footer -->
  381. <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>)
  382. </P>
  383. <!-- End Footer -->
  384. </BODY>