mirror of
https://github.com/boostorg/iostreams.git
synced 2026-02-22 15:32:20 +00:00
85 lines
2.7 KiB
HTML
Executable File
85 lines
2.7 KiB
HTML
Executable File
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>Peekable</TITLE>
|
|
<LINK REL='stylesheet' HREF='../../../../boost.css'>
|
|
<LINK REL='stylesheet' HREF='../theme/iostreams.css'>
|
|
</HEAD>
|
|
<BODY>
|
|
|
|
<!-- Begin Banner -->
|
|
|
|
<H1 CLASS='title'>Peekable</H1>
|
|
<HR CLASS='banner'>
|
|
|
|
<!-- End Banner -->
|
|
|
|
<H2>Description</H2>
|
|
|
|
<P>
|
|
A Peekable Device allows a character read from the input sequence to be putback.
|
|
</P>
|
|
|
|
<H2>Refinement of</H2>
|
|
|
|
<A HREF='source.html'>Source</A>.
|
|
|
|
<A NAME='types'></A>
|
|
<H2>Associated Types</H2>
|
|
|
|
Same as <A HREF='source.html'>Source</A>.
|
|
|
|
<H2>Notation</H2>
|
|
|
|
<TABLE CELLPADDING='2'>
|
|
<TR><TD><CODE>P</CODE></TD><TD>-</TD><TD>A type which is a model of Peekable</TD></TR>
|
|
<TR><TD><CODE>p</CODE></TD><TD>-</TD><TD>Object of type <CODE>P</CODE></TD></TR>
|
|
<TR><TD><CODE>c</CODE></TD><TD>-</TD><TD>Object of type equal to the character type of <CODE>P</CODE></TD></TR>
|
|
</TABLE>
|
|
|
|
<H2>Valid Expressions / Semantics</H2>
|
|
|
|
<TABLE CELLPADDING='5' BORDER='1'>
|
|
<TR><TH>Expression</TH><TH>Expression Type</TH><TH>Precondition</TH><TH>Postcondition</TH></TR>
|
|
<TR>
|
|
<TD>
|
|
<PRE CLASS='plain_code'><CODE><A HREF='../functions/putback.html'>boost::iostreams::putback</A>(p, c)</CODE></PRE>
|
|
</TD>
|
|
<TD><CODE>void</CODE></TD>
|
|
<TD>
|
|
One or more characters has been read from <CODE>p</CODE> using <A HREF='../functions/get.html'><CODE>boost::iostreams::get</CODE></A> or <A HREF='../functions/read.html'><CODE>boost::iostreams::read</CODE></A>, with no intervening i/o operations having been performed
|
|
</TD>
|
|
<TD>
|
|
Next character read from <CODE>p</CODE> using <A HREF='../functions/get.html'><CODE>boost::iostreams::get</CODE></A> or <A HREF='../functions/read.html'><CODE>boost::iostreams::read</CODE></A> will be equal to <CODE>c</CODE></A>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<H2>Exceptions</H2>
|
|
|
|
<P>
|
|
Errors which occur during the execution of <A CLASS='code' HREF='../functions/putback.html'><CODE>putback</CODE></A> are be indicated by throwing exceptions.
|
|
</P>
|
|
|
|
<H2>Models</H2>
|
|
<UL>
|
|
<LI>Standard input streams and stream buffers.
|
|
</UL>
|
|
|
|
<!-- Begin Footer -->
|
|
|
|
<HR>
|
|
<P CLASS='copyright'>Revised
|
|
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
|
20 May, 2004
|
|
<!--webbot bot="Timestamp" endspan i-checksum="38504" -->
|
|
</P>
|
|
|
|
<P CLASS='copyright'>© Copyright Jonathan Turkanis, 2004</P>
|
|
<P CLASS='copyright'>
|
|
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>)
|
|
</P>
|
|
|
|
<!-- End Footer -->
|
|
|
|
</BODY> |