dynamic_vector_buffer.html 9.81 KB
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>dynamic_vector_buffer</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="../reference.html" title="Reference">
<link rel="prev" href="dynamic_string_buffer/size.html" title="dynamic_string_buffer::size">
<link rel="next" href="dynamic_vector_buffer/capacity.html" title="dynamic_vector_buffer::capacity">
</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="dynamic_string_buffer/size.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="dynamic_vector_buffer/capacity.html"><img src="../../next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="asio.reference.dynamic_vector_buffer"></a><a class="link" href="dynamic_vector_buffer.html" title="dynamic_vector_buffer">dynamic_vector_buffer</a>
</h3></div></div></div>
<p>
        Adapt a vector to the DynamicBuffer requirements.
      </p>
<pre class="programlisting">template&lt;
    typename Elem,
    typename Allocator&gt;
class dynamic_vector_buffer
</pre>
<h5>
<a name="asio.reference.dynamic_vector_buffer.h0"></a>
        <span><a name="asio.reference.dynamic_vector_buffer.types"></a></span><a class="link" href="dynamic_vector_buffer.html#asio.reference.dynamic_vector_buffer.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/const_buffers_type.html" title="dynamic_vector_buffer::const_buffers_type"><span class="bold"><strong>const_buffers_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The type used to represent a sequence of constant buffers that
                  refers to the underlying memory.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/mutable_buffers_type.html" title="dynamic_vector_buffer::mutable_buffers_type"><span class="bold"><strong>mutable_buffers_type</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  The type used to represent a sequence of mutable buffers that refers
                  to the underlying memory.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="asio.reference.dynamic_vector_buffer.h1"></a>
        <span><a name="asio.reference.dynamic_vector_buffer.member_functions"></a></span><a class="link" href="dynamic_vector_buffer.html#asio.reference.dynamic_vector_buffer.member_functions">Member Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/capacity.html" title="dynamic_vector_buffer::capacity"><span class="bold"><strong>capacity</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Get the maximum size that the buffer may grow to without triggering
                  reallocation.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/commit.html" title="dynamic_vector_buffer::commit"><span class="bold"><strong>commit</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  DynamicBuffer_v1: Move bytes from the output sequence to the input
                  sequence.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/consume.html" title="dynamic_vector_buffer::consume"><span class="bold"><strong>consume</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  DynamicBuffer_v1: Remove characters from the input sequence. DynamicBuffer_v2:
                  Consume the specified number of bytes from the beginning of the
                  underlying memory.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/data.html" title="dynamic_vector_buffer::data"><span class="bold"><strong>data</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  DynamicBuffer_v1: Get a list of buffers that represents the input
                  sequence. <br> <span class="silver"></span><br> DynamicBuffer_v2: Get a sequence of buffers
                  that represents the underlying memory.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/dynamic_vector_buffer.html" title="dynamic_vector_buffer::dynamic_vector_buffer"><span class="bold"><strong>dynamic_vector_buffer</strong></span></a> <span class="silver">[constructor]</span>
                </p>
              </td>
<td>
                <p>
                  Construct a dynamic buffer from a vector. <br> <span class="silver"></span><br> DynamicBuffer_v2:
                  Copy construct a dynamic buffer. <br> <span class="silver"></span><br> Move construct a
                  dynamic buffer.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/grow.html" title="dynamic_vector_buffer::grow"><span class="bold"><strong>grow</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  DynamicBuffer_v2: Grow the underlying memory by the specified number
                  of bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/max_size.html" title="dynamic_vector_buffer::max_size"><span class="bold"><strong>max_size</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  Get the maximum size of the dynamic buffer.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/prepare.html" title="dynamic_vector_buffer::prepare"><span class="bold"><strong>prepare</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  DynamicBuffer_v1: Get a list of buffers that represents the output
                  sequence, with the given size.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/shrink.html" title="dynamic_vector_buffer::shrink"><span class="bold"><strong>shrink</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  DynamicBuffer_v2: Shrink the underlying memory by the specified
                  number of bytes.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <a class="link" href="dynamic_vector_buffer/size.html" title="dynamic_vector_buffer::size"><span class="bold"><strong>size</strong></span></a>
                </p>
              </td>
<td>
                <p>
                  DynamicBuffer_v1: Get the size of the input sequence. DynamicBuffer_v2:
                  Get the current size of the underlying memory.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<p>
        Requires that <code class="computeroutput">sizeof(Elem) == 1</code>.
      </p>
<h5>
<a name="asio.reference.dynamic_vector_buffer.h2"></a>
        <span><a name="asio.reference.dynamic_vector_buffer.requirements"></a></span><a class="link" href="dynamic_vector_buffer.html#asio.reference.dynamic_vector_buffer.requirements">Requirements</a>
      </h5>
<p>
        <span class="emphasis"><em>Header: </em></span><code class="literal">asio/buffer.hpp</code>
      </p>
<p>
        <span class="emphasis"><em>Convenience header: </em></span><code class="literal">asio.hpp</code>
      </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2003-2020 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></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="dynamic_string_buffer/size.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="dynamic_vector_buffer/capacity.html"><img src="../../next.png" alt="Next"></a>
</div>
</body>
</html>