diff --git a/doc/circular_buffer.html b/doc/circular_buffer.html index 831162e..7cd1eb1 100644 --- a/doc/circular_buffer.html +++ b/doc/circular_buffer.html @@ -1321,6 +1321,15 @@ template <class T, class Alloc> Does not invalidate any iterator. +
get_allocator()
+ get_allocator()
+ const
+ rend(),
+ begin()
+ rbegin()
+ rend()
+ const
+ rbegin()
+ const
+ at(size_type)
+ at(size_type)
+ const
+ operator[](size_type)
+ operator[](size_type)
+ const
+ back()
+ front()
+ back()
+ const
+ front()
+ const
+ |a|b|c|d| represents the 'array one', |e|f|g| represents the 'array two'
+ where |a|b|c|d| represents the "array one", |e|f|g| represents the "array two"
and | | | | is a free space.array_one() and
array_two()
- methods is constant the first option is suitable when calling the write method is 'cheap'. On the other
- hand the second option is more suitable when calling the write method is more 'expensive' than calling
+ methods is constant the first option is suitable when calling the write method is "cheap". On the other
+ hand the second option is more suitable when calling the write method is more "expensive" than calling
the linearize() method whose
complexity is linear.
@@ -2348,7 +2471,87 @@ template <class T, class Alloc>
Returns:
circular_buffer is empty the size of the returned array is 0.
+ |a|b|c|d|e|f|g| | | | the "array one" is
+ represented by |a|b|c|d|e|f|g| and the "array two" does not exist (the array_two() method
+ returns an array with the size 0).
+ array_two(),
+ linearize()
+ array_range
+ array_two();
+ This method in combination with array_one() can be useful
+ when passing the stored data into the legacy C API as an array.
+
circular_buffer is empty the size of the returned array is
+ 0.
array_two(),
- linearize(),
- array_one()
- const
+ "#classboost_1_1circular__buffer_1957cccdcb0c4ef7d80a34a990065818d">array_one()
array_range
- array_two();
+ This method in combination with array_two() const can be
+ useful when passing the stored data into the legacy C API as an array.
+
circular_buffer is empty the size of the returned array is 0.
+ array_one() for more
+ details.how to pass data into the legacy C API.
+
+ This method in combination with array_one() const can be
+ useful when passing the stored data into the legacy C API as an array.
+
circular_buffer is empty the size of the returned array is
+ 0.
+ array_one()
+ const
+ get_allocator()
*/
allocator_type get_allocator() const { return m_alloc; }
@@ -199,6 +200,7 @@ public:
Does not invalidate any iterator.
\note This method was added in order to optimize obtaining of the allocator with a state,
although use of stateful allocators in STL is discouraged.
+ \sa get_allocator() const
*/
allocator_type& get_allocator() { return m_alloc; }
@@ -279,6 +281,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa rend(), begin()
*/
reverse_iterator rbegin() { return reverse_iterator(end()); }
@@ -294,6 +297,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa rbegin()
*/
reverse_iterator rend() { return reverse_iterator(begin()); }
@@ -309,6 +313,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa rend() const
*/
const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
@@ -324,6 +329,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa rbegin() const
*/
const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
@@ -338,6 +344,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa at(size_type)
*/
reference operator [] (size_type index) {
BOOST_CB_ASSERT(index < size()); // check for invalid index
@@ -355,6 +362,7 @@ public:
Strong.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa at(size_type) const
*/
return_value_type operator [] (size_type index) const {
BOOST_CB_ASSERT(index < size()); // check for invalid index
@@ -371,6 +379,7 @@ public:
Strong.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa operator[](size_type)
*/
reference at(size_type index) {
check_position(index);
@@ -387,6 +396,7 @@ public:
Strong.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa operator[](size_type) const
*/
return_value_type at(size_type index) const {
check_position(index);
@@ -404,6 +414,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa back()
*/
reference front() {
BOOST_CB_ASSERT(!empty()); // check for empty buffer (front element not available)
@@ -421,6 +432,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa front()
*/
reference back() {
BOOST_CB_ASSERT(!empty()); // check for empty buffer (back element not available)
@@ -438,6 +450,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa back() const
*/
return_value_type front() const {
BOOST_CB_ASSERT(!empty()); // check for empty buffer (front element not available)
@@ -455,6 +468,7 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
+ \sa front() const
*/
return_value_type back() const {
BOOST_CB_ASSERT(!empty()); // check for empty buffer (back element not available)
@@ -473,7 +487,7 @@ public:
|e|f|g| | | |a|b|c|d||a|b|c|d| represents the 'array one', |e|f|g| represents the 'array two' and
+ where |a|b|c|d| represents the "array one", |e|f|g| represents the "array two" and
| | | | is a free space.int write(int file_desc, char* buff, int num_bytes);array_range ar = cbuff.array_one();
write(file_desc, ar.first, ar.second);
ar = cbuff.array_two();
- write(file_desc, ar.first, ar.second);
+ write(file_desc, ar.first, ar.second);
Or relying on the linearize() method:
write(file_desc, cbuff.linearize(), cbuff.size());
As the complexity of array_one() and array_two() methods is constant the first option
- is suitable when calling the write method is 'cheap'. On the other hand the second option is more suitable when
- calling the write method is more 'expensive' than calling the linearize() method whose complexity
+ is suitable when calling the write method is "cheap". On the other hand the second option is more suitable when
+ calling the write method is more "expensive" than calling the linearize() method whose complexity
is linear.
- \return The array range of the first continuos array of the internal buffer.
+ \return The array range of the first continuos array of the internal buffer. In the case the
+ circular_buffer is empty the size of the returned array is 0.
\throws Nothing.
\par Complexity
Constant.
@@ -497,23 +512,70 @@ public:
No-throw.
\par Iterator Invalidation
Does not invalidate any iterator.
- \sa array_two(), linearize(), array_one() const
+ \note In the case the internal buffer is linear e.g. |a|b|c|d|e|f|g| | | | the "array one" is
+ represented by |a|b|c|d|e|f|g| and the "array two" does not exist (the
+ array_two() method returns an array with the size 0).
+ \sa array_two(), linearize()
*/
array_range array_one() {
return array_range(m_first, (m_last <= m_first && !empty() ? m_end : m_last) - m_first);
}
- //! TODO doc
+ //! Get the second continuos array of the internal buffer.
+ /*!
+ This method in combination with array_one() can be useful when passing the stored data into the
+ legacy C API as an array.
+ \return The array range of the second continuos array of the internal buffer. In the case the internal buffer
+ is linear or the circular_buffer is empty the size of the returned array is
+ 0.
+ \throws Nothing.
+ \par Complexity
+ Constant.
+ \par Exception Safety
+ No-throw.
+ \par Iterator Invalidation
+ Does not invalidate any iterator.
+ \sa array_one()
+ */
array_range array_two() {
return array_range(m_buff, m_last <= m_first && !empty() ? m_last - m_buff : 0);
}
- //! TODO doc
+ //! Get the first continuos array of the internal buffer.
+ /*!
+ This method in combination with array_two() const can be useful when passing the stored data into
+ the legacy C API as an array.
+ \return The array range of the first continuos array of the internal buffer. In the case the
+ circular_buffer is empty the size of the returned array is 0.
+ \throws Nothing.
+ \par Complexity
+ Constant.
+ \par Exception Safety
+ No-throw.
+ \par Iterator Invalidation
+ Does not invalidate any iterator.
+ \sa array_one() for more details.how to pass data into the legacy C API.
+ */
const_array_range array_one() const {
return const_array_range(m_first, (m_last <= m_first && !empty() ? m_end : m_last) - m_first);
}
- //! TODO doc
+ //! Get the second continuos array of the internal buffer.
+ /*!
+ This method in combination with array_one() const can be useful when passing the stored data into
+ the legacy C API as an array.
+ \return The array range of the second continuos array of the internal buffer. In the case the internal buffer
+ is linear or the circular_buffer is empty the size of the returned array is
+ 0.
+ \throws Nothing.
+ \par Complexity
+ Constant.
+ \par Exception Safety
+ No-throw.
+ \par Iterator Invalidation
+ Does not invalidate any iterator.
+ \sa array_one() const
+ */
const_array_range array_two() const {
return const_array_range(m_buff, m_last <= m_first && !empty() ? m_last - m_buff : 0);
}