mirror of
https://github.com/boostorg/circular_buffer.git
synced 2026-02-01 20:32:18 +00:00
1530 lines
71 KiB
HTML
1530 lines
71 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||
<title>
|
||
Space Optimized Circular Buffer
|
||
</title>
|
||
</head>
|
||
<body>
|
||
<h1>
|
||
Space Optimized Circular Buffer
|
||
</h1>
|
||
<table id="title" border="0">
|
||
<tr>
|
||
<td>
|
||
<h1>
|
||
circular_buffer_space_optimized<T, Alloc>
|
||
</h1>
|
||
</td>
|
||
<td>
|
||
<a href="../../../"><img src="../../../boost.png" width="277" height="86" alt="Boost" border="0"></a>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<h2>
|
||
Contents
|
||
</h2><a href="#description">Description</a><br>
|
||
<a href="#synopsis">Synopsis</a><br>
|
||
<a href="#rationale">Rationale</a><br>
|
||
<a href="#header">Header Files</a><br>
|
||
<a href="#model">Modeled concepts</a><br>
|
||
<a href="#members">Template Parameters, Members and StandaloneFunctions</a><br>
|
||
<a href="#semantics">Semantics</a><br>
|
||
<a href="#see">See also</a><br>
|
||
<a href="#ack">Acknowledgments</a><br>
|
||
<h2>
|
||
<a id="description" name="description">Description</a>
|
||
</h2>
|
||
<p>
|
||
The <code>circular_buffer_space_optimized</code> container is an adaptor of the <code><a href=
|
||
"circular_buffer.html">circular_buffer</a></code> . The functionality of the
|
||
<code>circular_buffer_space_optimized</code> is similar to the base <code>circular_buffer</code> except it does
|
||
not allocate memory at once when created rather it allocates memory as needed. (The predictive memory allocation
|
||
is similar to typical <code>std::vector</code> implementation.) Moreover the memory is automatically freed as the
|
||
size of the container decreases.
|
||
</p>
|
||
<table id="figure" border="0">
|
||
<tr>
|
||
<td></td>
|
||
<td>
|
||
<img src="circular_buffer_space_optimized.png" width="700" height="350" alt="Space Optimized Circular Buffer"
|
||
border="0">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Figure:</b>
|
||
</td>
|
||
<td valign="top">
|
||
The memory allocation process of the space optimized circular buffer. The <code>min_capacity</code>
|
||
represents the minimal guaranteed amount of allocated memory. The allocated memory will never drop under this
|
||
value. By default the <code>min_capacity</code> is set to 0.
|
||
</td>
|
||
</tr>
|
||
</table><br>
|
||
<h2>
|
||
<a id="synopsis" name="synopsis">Synopsis</a>
|
||
</h2>
|
||
<div id="srcdoc_synopsis">
|
||
<table id="table_synopsis" border="0" cellpadding="10">
|
||
<tr>
|
||
<td>
|
||
<pre>
|
||
namespace boost {
|
||
|
||
template <class <a href="circular_buffer.html#templateparam_T">T</a>, class <a href=
|
||
"circular_buffer.html#templateparam_Alloc">Alloc</a>>
|
||
class circular_buffer_space_optimized
|
||
{
|
||
public:
|
||
typedef typename Alloc::value_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1cbdd7ca87e147c08cd2be267eefd6540">value_type</a>;
|
||
typedef typename Alloc::pointer <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_14ff917f8a6131ec18e91606727592a9c">pointer</a>;
|
||
typedef typename Alloc::const_pointer <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_190f7c6bcb624ad507de546366f49028a">const_pointer</a>;
|
||
typedef typename Alloc::reference <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1f38a9bc64d84757c661c2542ff9a7f65">reference</a>;
|
||
typedef typename Alloc::const_reference <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a>;
|
||
typedef typename Alloc::size_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a>;
|
||
typedef typename Alloc::difference_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_15313e723fa85d73db5826f8b722aa2a9">difference_type</a>;
|
||
typedef Alloc <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>;
|
||
typedef <i>implementation-defined</i> <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_15cab6d46f03c40d1e52d41843319ddb9">const_iterator</a>;
|
||
typedef <i>implementation-defined</i> <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a>;
|
||
typedef reverse_iterator<const_iterator> <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1ca423a848964c7915629c90fa7c58598">const_reverse_iterator</a>;
|
||
typedef reverse_iterator<iterator> <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1e5dbaec472f4b6ab6a8d4d0d6b15cbdb">reverse_iterator</a>;
|
||
typedef std::pair<pointer, size_type> <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_126d279f91fef717e25459a0817ff242f">array_range</a>;
|
||
typedef std::pair<const_pointer, size_type> <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11885d7f475b7e7a74c95b2448d243025">const_array_range</a>;
|
||
typedef <i>implementation-defined</i> <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_19d8966bb6cf8253d6194be7bbf7e3c7d">capacity_control</a>;
|
||
|
||
explicit <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1a05f824b31cd93d7695f4039edc7597f">circular_buffer_space_optimized</a>(const allocator_type& alloc = allocator_type());
|
||
explicit <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1066bf867e41386da88818addbb22dfeb">circular_buffer_space_optimized</a>(capacity_control capacity_ctrl, const allocator_type& alloc = allocator_type());
|
||
<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_16d55cc66a4d73e6756e6287fb73990fb">circular_buffer_space_optimized</a>(capacity_control capacity_ctrl,
|
||
value_type item, const allocator_type& alloc = allocator_type());
|
||
<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_15b15a87914ccc922cd730d5cabc00926">circular_buffer_space_optimized</a>(capacity_control capacity_ctrl,
|
||
size_type n, value_type item,
|
||
const allocator_type& alloc = allocator_type());
|
||
template <class InputIterator>
|
||
<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1296bbfa5c427d05cb02fc35249f83bb4">circular_buffer_space_optimized</a>(InputIterator first, InputIterator last);
|
||
template <class InputIterator>
|
||
<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1e6783618188f278ef087c1932ff5102d">circular_buffer_space_optimized</a>(capacity_control capacity_ctrl, InputIterator first, InputIterator last);
|
||
template <class InputIterator>
|
||
<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_11dd04145492c82a959b1df1167b4e217">circular_buffer_space_optimized</a>(InputIterator first,
|
||
InputIterator last, const allocator_type& alloc = allocator_type());
|
||
template <class InputIterator>
|
||
<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_186a0b8ef26e1368e4c815b6a0531d5fe">circular_buffer_space_optimized</a>(capacity_control capacity_ctrl,
|
||
InputIterator first, InputIterator last,
|
||
const allocator_type& alloc = allocator_type());
|
||
|
||
size_type <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1f3e4b9caed10cf7383682c6dea794917">min_capacity</a>() const;
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1b3667b889d9633e88d62adb98c1b1291">set_min_capacity</a>(size_type new_min_capacity);
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1c804242b924b93eb3db7f3f4587a096c">set_capacity</a>(size_type new_capacity);
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1f244ff5576b79f8d60e273c02d71c9f2">resize</a>(size_type new_size, value_type item = value_type());
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_16e2c5d77ea32819fd28f8ff2d5ce888a">rset_capacity</a>(size_type new_capacity);
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee">rresize</a>(size_type new_size, value_type item = value_type());
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_17ca4fda9526d0dad99706763c3b2d9f1">assign</a>(size_type n, value_type item);
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_10dff40462f19ca6cecd89443ceb8d71f">assign</a>(capacity_control capacity_ctrl, size_type n, value_type item);
|
||
template <class InputIterator>
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1582f452f07ebf08dda4c053b635e1581">assign</a>(capacity_control capacity_ctrl, InputIterator first, InputIterator last);
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205">push_back</a>(value_type item = value_type());
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c">push_front</a>(value_type item = value_type());
|
||
void <a href="#classboost_1_1circular__buffer__space__optimized_19c4290c18ab3dd2462dc01fb8368dff6">pop_back</a>();
|
||
void <a href="#classboost_1_1circular__buffer__space__optimized_1d7d496c40fc053258ac7d19cf5261788">pop_front</a>();
|
||
iterator <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_145877a0d46400f4894a13d25d138c130">insert</a>(iterator pos, value_type item = value_type());
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1dc2060ce1105d80429ff3f004ca0691b">insert</a>(iterator pos, size_type n, value_type item);
|
||
template <class InputIterator>
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_19eec983bc010f2e8415618455dd81da0">insert</a>(iterator pos, InputIterator first, InputIterator last);
|
||
iterator <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1cb3586429e49eeb2df2d2a09e19775de">rinsert</a>(iterator pos, value_type item = value_type());
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_11eff7ec0eb603d489bd12f8c48928c9d">rinsert</a>(iterator pos, size_type n, value_type item);
|
||
template <class InputIterator>
|
||
void <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1faeda7342f4717d7fb6b4589cb43b74e">rinsert</a>(iterator pos, InputIterator first, InputIterator last);
|
||
iterator <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_136feadef225bd8a10962a92c4ffcdfd3">erase</a>(iterator pos);
|
||
iterator <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_19e9a4e0dfca27329da78e014d97201ca">erase</a>(iterator first, iterator last);
|
||
iterator <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_16e96800422211d02621526c894b71fa1">rerase</a>(iterator pos);
|
||
iterator <a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_154fd4c2a67c7d6de6cbf6c8255729e98">rerase</a>(iterator first, iterator last);
|
||
allocator_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1a20b7d0e7a4da0af13286df9f53d660c">get_allocator</a>() const;
|
||
allocator_type& <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1af7758a36ac2f84a3024b50b4fc7e098">get_allocator</a>();
|
||
iterator <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_158d1ede2e85f5d46eda8db3f0c4efef0">begin</a>();
|
||
iterator <a href="circular_buffer.html#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end</a>();
|
||
const_iterator <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10640d3d41c13b6089b6f169224cf1038">begin</a>() const;
|
||
const_iterator <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_17890810d07bc595cfb87f9c47cb075ac">end</a>() const;
|
||
reverse_iterator <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1db3d6b10b6763549f54d2627228fa7aa">rbegin</a>();
|
||
reverse_iterator <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1cff9236a50107188b8942847a4dc2697">rend</a>();
|
||
const_reverse_iterator <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1765d91bf48341907418433a1e3aab026">rbegin</a>() const;
|
||
const_reverse_iterator <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_108dbf538b00a14daf5582ece80746fc3">rend</a>() const;
|
||
reference <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1d219f0d3203fb43b964a8cf63f1865cd">operator[]</a>(size_type index);
|
||
value_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1eb0a7fe7f8a56a4dc4c933b93adfcef4">operator[]</a>(size_type index) const;
|
||
reference <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1cd84838cb4fffb6c113fd0297e502edc">at</a>(size_type index);
|
||
value_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1b233a298f5845a0fcf2ecc56f4170810">at</a>(size_type index) const;
|
||
reference <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10d5fdeabeb352f47d1f7bb1ea8d9819f">front</a>();
|
||
reference <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a">back</a>();
|
||
value_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10df8595d83bb9d8a7ce50aabc678f90b">front</a>() const;
|
||
value_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1027201797868c6274feb6712f670a132">back</a>() const;
|
||
array_range <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one</a>();
|
||
array_range <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1f5081a54afbc2dfc1a7fb20329df7d5b">array_two</a>();
|
||
const_array_range <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10f4b157e27b1170a571417986b239945">array_one</a>() const;
|
||
const_array_range <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1bb8eb0f298ad2012c55c5303e1f174d5">array_two</a>() const;
|
||
pointer <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1ea728bf57f91aa8946eddf76ce816a4e">linearize</a>();
|
||
size_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size</a>() const;
|
||
size_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_157e2d506bc274b2a63fbe1b8fcafebd7">max_size</a>() const;
|
||
bool <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_15be1c2a005ec9828549ef6dd7ebed583">empty</a>() const;
|
||
bool <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1fd0eef8ba91210d1575404b7e3e8207a">full</a>() const;
|
||
size_type <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1de901b1737217f2c8140fc1691bf2d98">capacity</a>() const;
|
||
void <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_180c2e2e66a8fa9d0b7adc1b54921a8c3">resize</a>(size_type new_size, value_type item = value_type());
|
||
void <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_144ecd9ec5f54a2d61c7d132e445d3483">rresize</a>(size_type new_size, value_type item = value_type());
|
||
circular_buffer_space_optimized<T, Alloc>& <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1db1558911b2e251a587aeb3d8b3d797d">operator=</a>(const circular_buffer_space_optimized<T, Alloc>& cb);
|
||
void <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba4a81df16f386d31b04b49c82d1ada">assign</a>(size_type n, value_type item);
|
||
void <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1cfb85121fac69d36d687ee584fb115e3">assign</a>(size_type capacity, size_type n, value_type item);
|
||
template <class InputIterator>
|
||
void <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1253302d9bda5d7efbc4a6c311de3790c">assign</a>(InputIterator first, InputIterator last);
|
||
template <class InputIterator>
|
||
void <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_15201ad8c806598d87ee5988dc2180f3b">assign</a>(size_type capacity, InputIterator first, InputIterator last);
|
||
void <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1270ab7074c365663a6f18808024fd88b">swap</a>(circular_buffer_space_optimized<T, Alloc>& cb);
|
||
void <a href="circular_buffer.html#classboost_1_1circular__buffer_1826f5770a40b8b752eb9587378464d1e">clear</a>();
|
||
};
|
||
|
||
template <class T, class Alloc>
|
||
bool <a href=
|
||
"circular_buffer.html#namespaceboost_1d35871e838359b5215e1cbb353663207">operator==</a>(const circular_buffer_space_optimized<T, Alloc>& lhs,
|
||
const circular_buffer_space_optimized<T, Alloc>& rhs);
|
||
template <class T, class Alloc>
|
||
bool <a href=
|
||
"circular_buffer.html#namespaceboost_195b08213f201c2067d8acb024756329d">operator<</a>(const circular_buffer_space_optimized<T, Alloc>& lhs,
|
||
const circular_buffer_space_optimized<T, Alloc>& rhs);
|
||
template <class T, class Alloc>
|
||
bool <a href=
|
||
"circular_buffer.html#namespaceboost_1f5717e2f6532581a6492ff1839b18f6d">operator!=</a>(const circular_buffer_space_optimized<T, Alloc>& lhs,
|
||
const circular_buffer_space_optimized<T, Alloc>& rhs);
|
||
template <class T, class Alloc>
|
||
bool <a href=
|
||
"circular_buffer.html#namespaceboost_1f575d7a9741c2044424de50c966c12f3">operator></a>(const circular_buffer_space_optimized<T, Alloc>& lhs,
|
||
const circular_buffer_space_optimized<T, Alloc>& rhs);
|
||
template <class T, class Alloc>
|
||
bool <a href=
|
||
"circular_buffer.html#namespaceboost_179abcbacd24b67f08185db54aec8600d">operator<=</a>(const circular_buffer_space_optimized<T, Alloc>& lhs,
|
||
const circular_buffer_space_optimized<T, Alloc>& rhs);
|
||
template <class T, class Alloc>
|
||
bool <a href=
|
||
"circular_buffer.html#namespaceboost_11c31150380272af67deebef578c80b05">operator>=</a>(const circular_buffer_space_optimized<T, Alloc>& lhs,
|
||
const circular_buffer_space_optimized<T, Alloc>& rhs);
|
||
template <class T, class Alloc>
|
||
void <a href=
|
||
"circular_buffer.html#namespaceboost_14aa8f6a2c9640f3f22e266f0fca85777">swap</a>(circular_buffer_space_optimized<T, Alloc>& lhs,
|
||
circular_buffer_space_optimized<T, Alloc>& rhs);
|
||
|
||
} // namespace boost
|
||
</pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div><br>
|
||
<h2>
|
||
<a id="rationale" name="rationale">Rationale</a>
|
||
</h2>
|
||
<p>
|
||
The auto-resizing mode of the space optimized circular buffer can be useful in situations when the container can
|
||
possibly store large number of elements but most of its lifetime the container stores just few of them. The usage
|
||
of the <code>circular_buffer_space_optimized</code> will result in decreased memory consumption and can improve
|
||
the CPU cache effectiveness.
|
||
</p><br>
|
||
<h2>
|
||
<a id="header" name="header">Header Files</a>
|
||
</h2>
|
||
<p>
|
||
The <code>circular_buffer_space_optimized</code> is defined in the file <code><a href=
|
||
"../../../boost/circular_buffer.hpp">boost/circular_buffer.hpp</a></code> . There is also a forward declaration
|
||
for the <code>circular_buffer_space_optimized</code> in the header file <code><a href=
|
||
"../../../boost/circular_buffer_fwd.hpp">boost/circular_buffer_fwd.hpp</a></code> .
|
||
</p><br>
|
||
<h2>
|
||
<a id="model" name="model">Modeled concepts</a>
|
||
</h2>
|
||
<p>
|
||
<a href="http://www.sgi.com/tech/stl/RandomAccessContainer.html">Random AccessContainer</a>, <a href=
|
||
"http://www.sgi.com/tech/stl/FrontInsertionSequence.html">Front Insertion Sequence</a> and <a href=
|
||
"http://www.sgi.com/tech/stl/BackInsertionSequence.html">Back Insertion Sequence</a>.
|
||
</p><br>
|
||
<h2>
|
||
<a id="members" name="members">Template Parameters, Members and Friend Functions</a>
|
||
</h2>
|
||
<p>
|
||
Template parameters, members and friend functions of the <code>circular_buffer_space_optimized</code> are almost
|
||
the same as for the base <code>circular_buffer</code> . Refer the <code>circular_buffer</code> <a href=
|
||
"circular_buffer.html#parameters">documentation</a> and also its <a href="srcdoc/index.html">source code
|
||
documentation</a> for a detailed description.
|
||
</p>
|
||
<div id="srcdoc_types">
|
||
<table id="table_public_types" border="1">
|
||
<tr>
|
||
<th>
|
||
Type
|
||
</th>
|
||
<th>
|
||
Description
|
||
</th>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_19d8966bb6cf8253d6194be7bbf7e3c7d" name=
|
||
"classboost_1_1circular__buffer__space__optimized_19d8966bb6cf8253d6194be7bbf7e3c7d"><code>capacity_control</code></a>
|
||
</td>
|
||
<td>
|
||
Capacity controller of the space optimized circular buffer.<br>
|
||
<code>struct capacity_control {<br>
|
||
<20><> capacity_control(size_type capacity, size_type min_capacity = 0);<br>
|
||
<20><> size_type m_capacity;<br>
|
||
<20><> size_type m_min_capacity;<br>
|
||
};<br></code><br>
|
||
The converting constructor of the <code>capacity_control</code> allows implicit conversion from
|
||
<code>size_type</code> like types which ensures compatibility of creating an instance of the <code><a href=
|
||
"#classboost_1_1circular__buffer__space__optimized"></a></code> with other STL containers.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<p>
|
||
The specific methods of the <code>circular_buffer_space_optimized</code> are listed below.
|
||
</p><br>
|
||
<h2>
|
||
<a id="constructors" name="constructors">Constructors</a>
|
||
</h2>
|
||
<div id="srcdoc_constructors">
|
||
<table id="table_constructors" border="1">
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1a05f824b31cd93d7695f4039edc7597f" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1a05f824b31cd93d7695f4039edc7597f"></a> <code><b>explicit
|
||
circular_buffer_space_optimized(const<73><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&<EFBFBD>alloc
|
||
= allocator_type());</b></code><br>
|
||
<table id="table_function_desc_id4511346">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4511415">
|
||
<tr>
|
||
<td>
|
||
Create an empty space optimized circular buffer with a maximum capacity.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_detailed_desc_id4511425">
|
||
<tr>
|
||
<td>
|
||
TODO - doc
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1066bf867e41386da88818addbb22dfeb" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1066bf867e41386da88818addbb22dfeb"></a> <code><b>explicit
|
||
circular_buffer_space_optimized(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10b8131db04bfa69c99f23aed053ca8a8">capacity_control</a><EFBFBD>capacity_ctrl,
|
||
const<73><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&<EFBFBD>alloc
|
||
= allocator_type());</b></code><br>
|
||
<table id="table_function_desc_id4511449">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4511536">
|
||
<tr>
|
||
<td>
|
||
Create an empty space optimized circular buffer with a given capacity.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_pre_desc_id4511600">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Precondition:</b>
|
||
</td>
|
||
<td>
|
||
<code>capacity >= min_capacity</code>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_post_desc_id4511610">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Postcondition:</b>
|
||
</td>
|
||
<td>
|
||
<code>(*this).<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1de901b1737217f2c8140fc1691bf2d98"></a> ==
|
||
capacity && (*this).size == 0</code><br>
|
||
Allocates memory specified by the <code>min_capacity</code> parameter.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_note_desc_id4511662">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Note:</b>
|
||
</td>
|
||
<td>
|
||
It is considered as a bug if the precondition is not met (i.e. if <code>capacity <
|
||
min_capacity</code>) and an assertion will be invoked in the debug mode.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_16d55cc66a4d73e6756e6287fb73990fb" name=
|
||
"classboost_1_1circular__buffer__space__optimized_16d55cc66a4d73e6756e6287fb73990fb"></a>
|
||
<code><b>circular_buffer_space_optimized(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10b8131db04bfa69c99f23aed053ca8a8">capacity_control</a><EFBFBD>capacity_ctrl,<br>
|
||
|
||
<20><><EFBFBD> <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item,
|
||
const<73><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&<EFBFBD>alloc
|
||
= allocator_type());</b></code><br>
|
||
<table id="table_function_desc_id4511697">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4511802">
|
||
<tr>
|
||
<td>
|
||
Create a full space optimized circular buffer filled with copies of <code>item</code>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_pre_desc_id4511886">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Precondition:</b>
|
||
</td>
|
||
<td>
|
||
<code>capacity >= min_capacity</code>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_post_desc_id4511895">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Postcondition:</b>
|
||
</td>
|
||
<td>
|
||
<code>(*this).<a href="#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32"></a>
|
||
== capacity && (*this)[0] == (*this)[1] == ... == (*this).<a href=
|
||
"#classboost_1_1circular__buffer_1d985d974020f88bb4255d8edbae0a30a"></a> == item</code>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_note_desc_id4511965">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Note:</b>
|
||
</td>
|
||
<td>
|
||
It is considered as a bug if the precondition is not met (i.e. if <code>capacity <
|
||
min_capacity</code>) and an assertion will be invoked in the debug mode.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_15b15a87914ccc922cd730d5cabc00926" name=
|
||
"classboost_1_1circular__buffer__space__optimized_15b15a87914ccc922cd730d5cabc00926"></a>
|
||
<code><b>circular_buffer_space_optimized(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10b8131db04bfa69c99f23aed053ca8a8">capacity_control</a><EFBFBD>capacity_ctrl,<br>
|
||
|
||
<20><><EFBFBD> <a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>n,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item,<br>
|
||
|
||
<20><><EFBFBD> const<73><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&<EFBFBD>alloc
|
||
= allocator_type());</b></code><br>
|
||
<table id="table_function_desc_id4512000">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4512122">
|
||
<tr>
|
||
<td>
|
||
TODO doc.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1296bbfa5c427d05cb02fc35249f83bb4" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1296bbfa5c427d05cb02fc35249f83bb4"></a>
|
||
<code><b>template<EFBFBD><class<EFBFBD>InputIterator><br>
|
||
<20><><EFBFBD> circular_buffer_space_optimized(InputIterator<6F>first, InputIterator<6F>last);</b></code><br>
|
||
<table id="table_function_desc_id4512152">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4512227">
|
||
<tr>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1e6783618188f278ef087c1932ff5102d" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1e6783618188f278ef087c1932ff5102d"></a>
|
||
<code><b>template<EFBFBD><class<EFBFBD>InputIterator><br>
|
||
<20><><EFBFBD> circular_buffer_space_optimized(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10b8131db04bfa69c99f23aed053ca8a8">capacity_control</a><EFBFBD>capacity_ctrl,
|
||
InputIterator<6F>first, InputIterator<6F>last);</b></code><br>
|
||
<table id="table_function_desc_id4512253">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4512346">
|
||
<tr>
|
||
<td></td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_11dd04145492c82a959b1df1167b4e217" name=
|
||
"classboost_1_1circular__buffer__space__optimized_11dd04145492c82a959b1df1167b4e217"></a>
|
||
<code><b>template<EFBFBD><class<EFBFBD>InputIterator><br>
|
||
<20><><EFBFBD> circular_buffer_space_optimized(InputIterator<6F>first,<br>
|
||
<20><><EFBFBD> <20><><EFBFBD>InputIterator<6F>last, const<73><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&<EFBFBD>alloc
|
||
= allocator_type());</b></code><br>
|
||
<table id="table_function_desc_id4512387">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4512495">
|
||
<tr>
|
||
<td>
|
||
TODO doc.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_186a0b8ef26e1368e4c815b6a0531d5fe" name=
|
||
"classboost_1_1circular__buffer__space__optimized_186a0b8ef26e1368e4c815b6a0531d5fe"></a>
|
||
<code><b>template<EFBFBD><class<EFBFBD>InputIterator><br>
|
||
<20><><EFBFBD> circular_buffer_space_optimized(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10b8131db04bfa69c99f23aed053ca8a8">capacity_control</a><EFBFBD>capacity_ctrl,<br>
|
||
|
||
<20><><EFBFBD> <20><><EFBFBD>InputIterator<6F>first, InputIterator<6F>last,<br>
|
||
<20><><EFBFBD> <20><><EFBFBD>const<73><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_14e07c6ddfe89debe384e59bed06e7cb7">allocator_type</a>&<EFBFBD>alloc
|
||
= allocator_type());</b></code><br>
|
||
<table id="table_function_desc_id4512524">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4512650">
|
||
<tr>
|
||
<td>
|
||
Create a space optimized circular buffer with a copy of a range.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_pre_desc_id4512746">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Precondition:</b>
|
||
</td>
|
||
<td>
|
||
<code>capacity >= min_capacity</code> and valid range <code>[first, last)</code>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_post_desc_id4512760">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Postcondition:</b>
|
||
</td>
|
||
<td>
|
||
<code>(*this).<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1de901b1737217f2c8140fc1691bf2d98"></a> ==
|
||
capacity</code><br>
|
||
Allocates at least as much memory as specified by the - TODO change <code>min_capacity</code>
|
||
parameter.<br>
|
||
If the number of items to copy from the range <code>[first, last)</code> is greater than the
|
||
specified <code>capacity</code> then only elements from the range <code>[last - capacity,
|
||
last)</code> will be copied.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_note_desc_id4512840">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Note:</b>
|
||
</td>
|
||
<td>
|
||
It is considered as a bug if the precondition is not met (i.e. if <code>capacity <
|
||
min_capacity</code>) and an assertion will be invoked in the debug mode.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div><br>
|
||
<h2>
|
||
<a id="methods" name="methods">Public Member Functions</a>
|
||
</h2>
|
||
<div id="srcdoc_methods">
|
||
<table id="table_methods" border="1">
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1f3e4b9caed10cf7383682c6dea794917" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1f3e4b9caed10cf7383682c6dea794917"></a> <code><b><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>min_capacity()
|
||
const;</b></code><br>
|
||
<table id="table_function_desc_id4510078">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4510121">
|
||
<tr>
|
||
<td>
|
||
Return the minimal guaranteed amount of allocated memory.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_detailed_desc_id4510130">
|
||
<tr>
|
||
<td>
|
||
The allocated memory will never drop under this value.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1b3667b889d9633e88d62adb98c1b1291" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1b3667b889d9633e88d62adb98c1b1291"></a>
|
||
<code><b>void<EFBFBD>set_min_capacity(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>new_min_capacity);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4510213">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4510266">
|
||
<tr>
|
||
<td>
|
||
Change the minimal guaranteed amount of allocated memory.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_pre_desc_id4510277">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Precondition:</b>
|
||
</td>
|
||
<td>
|
||
<code>(*this).<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1de901b1737217f2c8140fc1691bf2d98"></a>
|
||
>= new_min_capacity</code>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_post_desc_id4510297">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Postcondition:</b>
|
||
</td>
|
||
<td>
|
||
<code>(*this).<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1f3e4b9caed10cf7383682c6dea794917"></a> ==
|
||
new_min_capacity</code> Allocates memory specified by the <code>new_min_capacity</code>
|
||
parameter.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_note_desc_id4510320">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Note:</b>
|
||
</td>
|
||
<td>
|
||
It is considered as a bug if the precondition is not met (i.e. if <code>new_min_capacity >
|
||
(*this).<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_1de901b1737217f2c8140fc1691bf2d98"></a></code>)
|
||
and an assertion will be invoked in the debug mode.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1c804242b924b93eb3db7f3f4587a096c" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1c804242b924b93eb3db7f3f4587a096c"></a>
|
||
<code><b>void<EFBFBD>set_capacity(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>new_capacity);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4510648">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4510701">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_pre_desc_id4510720">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Precondition:</b>
|
||
</td>
|
||
<td>
|
||
<code><a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1f3e4b9caed10cf7383682c6dea794917"></a>
|
||
<= new_capacity</code>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_note_desc_id4510737">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Note:</b>
|
||
</td>
|
||
<td>
|
||
It is considered as a bug if the precondition is not met (i.e. if <code>new_capacity >
|
||
<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1f3e4b9caed10cf7383682c6dea794917"></a></code>)
|
||
and an assertion will be invoked in the debug mode.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1f244ff5576b79f8d60e273c02d71c9f2" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1f244ff5576b79f8d60e273c02d71c9f2"></a>
|
||
<code><b>void<EFBFBD>resize(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>new_size,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item
|
||
= value_type());</b></code><br>
|
||
<table id="table_function_desc_id4510807">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4510888">
|
||
<tr>
|
||
<td>
|
||
See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_16e2c5d77ea32819fd28f8ff2d5ce888a" name=
|
||
"classboost_1_1circular__buffer__space__optimized_16e2c5d77ea32819fd28f8ff2d5ce888a"></a>
|
||
<code><b>void<EFBFBD>rset_capacity(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>new_capacity);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4510997">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4511050">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_pre_desc_id4511069">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Precondition:</b>
|
||
</td>
|
||
<td>
|
||
<code><a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1f3e4b9caed10cf7383682c6dea794917"></a>
|
||
<= new_capacity</code>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<table id="table_note_desc_id4511086">
|
||
<tr>
|
||
<td valign="top">
|
||
<b>Note:</b>
|
||
</td>
|
||
<td>
|
||
It is considered as a bug if the precondition is not met (i.e. if <code>new_capacity >
|
||
<a href=
|
||
"#classboost_1_1circular__buffer__space__optimized_1f3e4b9caed10cf7383682c6dea794917"></a></code>)
|
||
and an assertion will be invoked in the debug mode.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1d45e2e72d9e3fb42e090ebc47ac8d7ee"></a>
|
||
<code><b>void<EFBFBD>rresize(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>new_size,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item
|
||
= value_type());</b></code><br>
|
||
<table id="table_function_desc_id4511156">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4511238">
|
||
<tr>
|
||
<td>
|
||
See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_17ca4fda9526d0dad99706763c3b2d9f1" name=
|
||
"classboost_1_1circular__buffer__space__optimized_17ca4fda9526d0dad99706763c3b2d9f1"></a>
|
||
<code><b>void<EFBFBD>assign(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>n,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4512975">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4513045">
|
||
<tr>
|
||
<td>
|
||
See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_10dff40462f19ca6cecd89443ceb8d71f" name=
|
||
"classboost_1_1circular__buffer__space__optimized_10dff40462f19ca6cecd89443ceb8d71f"></a>
|
||
<code><b>void<EFBFBD>assign(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10b8131db04bfa69c99f23aed053ca8a8">capacity_control</a><EFBFBD>capacity_ctrl,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>n,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4513097">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4513184">
|
||
<tr>
|
||
<td>
|
||
See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1582f452f07ebf08dda4c053b635e1581" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1582f452f07ebf08dda4c053b635e1581"></a>
|
||
<code><b>template<EFBFBD><class<EFBFBD>InputIterator><br>
|
||
<20><><EFBFBD> void<69>assign(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_10b8131db04bfa69c99f23aed053ca8a8">capacity_control</a><EFBFBD>capacity_ctrl,
|
||
InputIterator<6F>first, InputIterator<6F>last);</b></code><br>
|
||
<table id="table_function_desc_id4513367">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4513458">
|
||
<tr>
|
||
<td>
|
||
See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_14fd3b613f754d529ca250f2563b2f863" name=
|
||
"classboost_1_1circular__buffer__space__optimized_14fd3b613f754d529ca250f2563b2f863"></a>
|
||
<code><b>void<EFBFBD>swap(circular_buffer_space_optimized<T,Alloc>&<EFBFBD>cb);</b></code><br>
|
||
<table id="table_function_desc_id4513539">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4513593">
|
||
<tr>
|
||
<td>
|
||
See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1cf3ffed54f5fece9315fb96726e5e205"></a>
|
||
<code><b>void<EFBFBD>push_back(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item
|
||
= value_type());</b></code><br>
|
||
<table id="table_function_desc_id4513671">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4513736">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1f0484fd492b377ff80c0bcb76183162c"></a>
|
||
<code><b>void<EFBFBD>push_front(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item
|
||
= value_type());</b></code><br>
|
||
<table id="table_function_desc_id4513815">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4513879">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_19c4290c18ab3dd2462dc01fb8368dff6" name=
|
||
"classboost_1_1circular__buffer__space__optimized_19c4290c18ab3dd2462dc01fb8368dff6"></a>
|
||
<code><b>void<EFBFBD>pop_back();</b></code><br>
|
||
<table id="table_function_desc_id4513958">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4514000">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1d7d496c40fc053258ac7d19cf5261788" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1d7d496c40fc053258ac7d19cf5261788"></a>
|
||
<code><b>void<EFBFBD>pop_front();</b></code><br>
|
||
<table id="table_function_desc_id4514079">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4514121">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_145877a0d46400f4894a13d25d138c130" name=
|
||
"classboost_1_1circular__buffer__space__optimized_145877a0d46400f4894a13d25d138c130"></a> <code><b><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>insert(<a href="circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>pos,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item
|
||
= value_type());</b></code><br>
|
||
<table id="table_function_desc_id4514200">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4514288">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1dc2060ce1105d80429ff3f004ca0691b" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1dc2060ce1105d80429ff3f004ca0691b"></a>
|
||
<code><b>void<EFBFBD>insert(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>pos,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>n,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4514410">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4514496">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_19eec983bc010f2e8415618455dd81da0" name=
|
||
"classboost_1_1circular__buffer__space__optimized_19eec983bc010f2e8415618455dd81da0"></a>
|
||
<code><b>template<EFBFBD><class<EFBFBD>InputIterator><br>
|
||
<20><><EFBFBD> void<69>insert(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>pos,
|
||
InputIterator<6F>first, InputIterator<6F>last);</b></code><br>
|
||
<table id="table_function_desc_id4514589">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4514680">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1cb3586429e49eeb2df2d2a09e19775de" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1cb3586429e49eeb2df2d2a09e19775de"></a> <code><b><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>rinsert(<a href="circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>pos,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item
|
||
= value_type());</b></code><br>
|
||
<table id="table_function_desc_id4514758">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4514846">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_11eff7ec0eb603d489bd12f8c48928c9d" name=
|
||
"classboost_1_1circular__buffer__space__optimized_11eff7ec0eb603d489bd12f8c48928c9d"></a>
|
||
<code><b>void<EFBFBD>rinsert(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>pos,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_19ba12c0142a21a7d960877c22fa3ea00">size_type</a><EFBFBD>n,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer__space__optimized_116b928fa9d1df586ce1e4b60837afe9f">value_type</a><EFBFBD>item);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4514952">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4515039">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_1faeda7342f4717d7fb6b4589cb43b74e" name=
|
||
"classboost_1_1circular__buffer__space__optimized_1faeda7342f4717d7fb6b4589cb43b74e"></a>
|
||
<code><b>template<EFBFBD><class<EFBFBD>InputIterator><br>
|
||
<20><><EFBFBD> void<69>rinsert(<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>pos,
|
||
InputIterator<6F>first, InputIterator<6F>last);</b></code><br>
|
||
<table id="table_function_desc_id4515131">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4515222">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_136feadef225bd8a10962a92c4ffcdfd3" name=
|
||
"classboost_1_1circular__buffer__space__optimized_136feadef225bd8a10962a92c4ffcdfd3"></a> <code><b><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>erase(<a href="circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>pos);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4515300">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4515359">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_19e9a4e0dfca27329da78e014d97201ca" name=
|
||
"classboost_1_1circular__buffer__space__optimized_19e9a4e0dfca27329da78e014d97201ca"></a> <code><b><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>erase(<a href="circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>first,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>last);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4515495">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4515572">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_16e96800422211d02621526c894b71fa1" name=
|
||
"classboost_1_1circular__buffer__space__optimized_16e96800422211d02621526c894b71fa1"></a> <code><b><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>rerase(<a href="circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>pos);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4515664">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4515723">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<a id="classboost_1_1circular__buffer__space__optimized_154fd4c2a67c7d6de6cbf6c8255729e98" name=
|
||
"classboost_1_1circular__buffer__space__optimized_154fd4c2a67c7d6de6cbf6c8255729e98"></a> <code><b><a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>rerase(<a href="circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>first,
|
||
<a href=
|
||
"circular_buffer.html#classboost_1_1circular__buffer_11b8a33f2dc8519b8a7d344ed4408c532">iterator</a><EFBFBD>last);</b></code><br>
|
||
|
||
<table id="table_function_desc_id4515815">
|
||
<tr>
|
||
<td>
|
||
<20><><EFBFBD>
|
||
</td>
|
||
<td>
|
||
<table id="table_detailed_desc_id4515892">
|
||
<tr>
|
||
<td>
|
||
! See the <a href="#classboost_1_1circular__buffer"></a> source documentation.
|
||
</td>
|
||
</tr>
|
||
</table>The rules for iterator invalidation differ from the original <a href=
|
||
"#classboost_1_1circular__buffer"></a>. See the <a href=
|
||
"../circular_buffer_adaptor.html#invalidation">documentation</a>.
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div><br>
|
||
<h2>
|
||
<a id="semantics" name="semantics">Semantics</a>
|
||
</h2>
|
||
<p>
|
||
TODO remove this section
|
||
</p>
|
||
<p>
|
||
The behaviour of memory auto-resizing is as follows:
|
||
</p>
|
||
<ul>
|
||
<li>Minimal capacity is allocated when an empty <code>circular_buffer_space_optimized</code> is created.
|
||
</li>
|
||
<li>When a non-empty <code>circular_buffer_space_optimized</code> container is created the allocated memory
|
||
reflects the size of the container.
|
||
</li>
|
||
<li>
|
||
<code>push_back</code> , <code>push_front</code> , <code>insert</code> and <code>rinsert</code> will
|
||
predictively increase the allocated memory if necessary. (The predictive memory allocation is similar to
|
||
<code>std::vector</code> .)
|
||
</li>
|
||
<li>
|
||
<code>set_capacity</code> , <code>resize</code> , <code>assign</code> , <code>insert</code> (range or n items),
|
||
<code>rinsert</code> (range or n items), <code>erase</code> (range) and <code>clear</code> will accommodate the
|
||
allocated memory as necessary.
|
||
</li>
|
||
<li>
|
||
<code>pop_back</code> , <code>pop_front</code> , <code>erase</code> and <code>clear</code> will predictively
|
||
decrease the allocated memory.
|
||
</li>
|
||
</ul>
|
||
<p>
|
||
The semantics of the <code>circular_buffer_space_optimized</code> then follows the <a href=
|
||
"circular_buffer.html#semantics">semantics</a> of the base <code>circular_buffer</code> except the invalidation
|
||
rules.
|
||
</p>
|
||
<p>
|
||
<a id="invalidation" name="invalidation"></a> The rule for iterator invalidation for
|
||
<code>circular_buffer_space_optimized</code> is as follows:
|
||
</p>
|
||
<ul>
|
||
<li>
|
||
<code>data</code> , <code>set_capacity</code> , <code>resize</code> , <code>operator=</code> ,
|
||
<code>assign</code> , <code>swap</code> , <code>push_back</code> , <code>push_front</code> ,
|
||
<code>pop_back</code> , <code>pop_front</code> , <code>insert</code> , <code>rinsert</code> ,
|
||
<code>erase</code> and <code>clear</code> invalidate all iterators pointing to the
|
||
<code>circular_buffer_space_optimized</code> .
|
||
</li>
|
||
</ul><br>
|
||
<h2>
|
||
<a id="see" name="see">See also</a>
|
||
</h2>
|
||
<p>
|
||
<code><a href="circular_buffer.html">boost::circular_buffer</a>, <a href=
|
||
"http://www.sgi.com/tech/stl/Vector.html">std::vector</a></code>
|
||
</p><br>
|
||
<h2>
|
||
<a id="ack" name="ack">Acknowledgments</a>
|
||
</h2>
|
||
<p>
|
||
The idea of the space optimized circular buffer has been introduced by Pavel Vozenilek.
|
||
</p>
|
||
<hr size="1">
|
||
<table id="footer" border="0" width="100%">
|
||
<tr>
|
||
<td align="left" valign="top">
|
||
<p>
|
||
<small>Copyright <20> 2003-2006 Jan Gaspar</small>
|
||
</p>
|
||
<p>
|
||
<small>Use, modification, and distribution is subject to the Boost Software License, Version 1.0.<br>
|
||
(See accompanying file <code>LICENSE_1_0.txt</code> or copy at <a href=
|
||
"http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>.)</small>
|
||
</p>
|
||
</td>
|
||
<td align="right" valign="top">
|
||
<a href="http://validator.w3.org/check?url=referer"><img src="valid-html40.png" height="31" width="88" alt=
|
||
"Valid HTML 4.0!" border="0"></a>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</body>
|
||
</html>
|