Insane_DNS/libraries/asio-1.28.1/doc/asio/reference/basic_streambuf/prepare.html

80 lines
4.7 KiB
HTML
Raw Permalink Normal View History

2023-10-24 21:59:30 -04:00
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>basic_streambuf::prepare</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="Asio">
<link rel="up" href="../basic_streambuf.html" title="basic_streambuf">
<link rel="prev" href="overflow.html" title="basic_streambuf::overflow">
<link rel="next" href="reserve.html" title="basic_streambuf::reserve">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../../asio.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overflow.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../basic_streambuf.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="reserve.html"><img src="../../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="asio.reference.basic_streambuf.prepare"></a><a class="link" href="prepare.html" title="basic_streambuf::prepare">basic_streambuf::prepare</a>
</h4></div></div></div>
<p>
<a class="indexterm" name="asio.indexterm.basic_streambuf.prepare"></a>
Get a list
of buffers that represents the output sequence, with the given size.
</p>
<pre class="programlisting"><span class="identifier">mutable_buffers_type</span> <span class="identifier">prepare</span><span class="special">(</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">n</span><span class="special">);</span>
</pre>
<p>
Ensures that the output sequence can accommodate <code class="computeroutput"><span class="identifier">n</span></code>
characters, reallocating character array objects as necessary.
</p>
<h6>
<a name="asio.reference.basic_streambuf.prepare.h0"></a>
<span><a name="asio.reference.basic_streambuf.prepare.return_value"></a></span><a class="link" href="prepare.html#asio.reference.basic_streambuf.prepare.return_value">Return Value</a>
</h6>
<p>
An object of type <code class="computeroutput"><span class="identifier">mutable_buffers_type</span></code>
that satisfies MutableBufferSequence requirements, representing character
array objects at the start of the output sequence such that the sum of
the buffer sizes is <code class="computeroutput"><span class="identifier">n</span></code>.
</p>
<h6>
<a name="asio.reference.basic_streambuf.prepare.h1"></a>
<span><a name="asio.reference.basic_streambuf.prepare.exceptions"></a></span><a class="link" href="prepare.html#asio.reference.basic_streambuf.prepare.exceptions">Exceptions</a>
</h6>
<div class="variablelist">
<p class="title"><b></b></p>
<dl>
<dt><span class="term">std::length_error</span></dt>
<dd><p>
If <code class="computeroutput"><span class="identifier">size</span><span class="special">()</span>
<span class="special">+</span> <span class="identifier">n</span>
<span class="special">&gt;</span> <span class="identifier">max_size</span><span class="special">()</span></code>.
</p></dd>
</dl>
</div>
<h6>
<a name="asio.reference.basic_streambuf.prepare.h2"></a>
<span><a name="asio.reference.basic_streambuf.prepare.remarks"></a></span><a class="link" href="prepare.html#asio.reference.basic_streambuf.prepare.remarks">Remarks</a>
</h6>
<p>
The returned object is invalidated by any <code class="computeroutput"><span class="identifier">basic_streambuf</span></code>
member function that modifies the input sequence or output sequence.
</p>
</div>
<div class="copyright-footer">Copyright © 2003-2023 Christopher M. Kohlhoff<p>
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" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="overflow.html"><img src="../../../prev.png" alt="Prev"></a><a accesskey="u" href="../basic_streambuf.html"><img src="../../../up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../home.png" alt="Home"></a><a accesskey="n" href="reserve.html"><img src="../../../next.png" alt="Next"></a>
</div>
</body>
</html>