|
From: Jan G. <jan...@us...> - 2007-04-16 23:19:16
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/circular_buffer/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31610/libs/circular_buffer/doc Modified Files: circular_buffer.html circular_buffer_space_optimized.html Log Message: circular_buffer: updated srcdoc + assign bug fix Index: circular_buffer.html =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/circular_buffer/doc/circular_buffer.html,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- circular_buffer.html 15 Apr 2007 22:52:33 -0000 1.65 +++ circular_buffer.html 16 Apr 2007 23:19:07 -0000 1.66 @@ -4319,7 +4319,8 @@ <b>Iterator Invalidation:</b> </dt> <dd> - Invalidates all iterators pointing to the <code>circular_buffer</code>. + Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to + <a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>). </dd> </dl> <dl> @@ -4359,7 +4360,7 @@ <p> The capacity of the <code>circular_buffer</code> will be set to the specified value and the content of the <code>circular_buffer</code> will be removed and replaced with copies of elements from the specified - range. (See the <i>Effect</i>.) + range. </p> <dl> <dt> @@ -4447,7 +4448,8 @@ <b>Iterator Invalidation:</b> </dt> <dd> - Invalidates all iterators pointing to the <code>circular_buffer</code>. + Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to + <a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>). </dd> </dl> <dl> Index: circular_buffer_space_optimized.html =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/circular_buffer/doc/circular_buffer_space_optimized.html,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- circular_buffer_space_optimized.html 15 Apr 2007 22:52:34 -0000 1.39 +++ circular_buffer_space_optimized.html 16 Apr 2007 23:19:07 -0000 1.40 @@ -1956,9 +1956,115 @@ <class InputIterator><br> void assign(InputIterator first, InputIterator last);</b></code><br> <br> - See the <a href="circular_buffer.html#classboost_1_1circular__buffer">circular_buffer</a> source - documentation.<br> - <br> + Assign a copy of the range into the space optimized circular buffer. + <p> + The content of the <code>circular_buffer_space_optimized</code> will be removed and replaced with copies + of elements from the specified range. + </p> + <dl> + <dt> + <b>Precondition:</b> + </dt> + <dd> + Valid range <code>[first, last)</code>.<br> + <code>first</code> and <code>last</code> have to meet the requirements of <a href= + "http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>. + </dd> + </dl> + <dl> + <dt> + <b>Effect:</b> + </dt> + <dd> + <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity() + == std::distance(first, last) && <a href= + "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.min_capacity() + == 0 && <a href= + "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> == + std::distance(first, last) && (*this)[0]== *first && (*this)[1] == *(first + 1) + && ... && (*this)[std::distance(first, last) - 1] == *(last - 1)</code> + </dd> + </dl> + <dl> + <dt> + <b>Parameter(s):</b> + </dt> + <dd> + <dl compact> + <dt> + <code>first</code> + </dt> + <dd> + The beginning of the range to be copied. + </dd> + </dl> + </dd> + <dd> + <dl compact> + <dt> + <code>last</code> + </dt> + <dd> + The end of the range to be copied. + </dd> + </dl> + </dd> + </dl> + <dl> + <dt> + <b>Throws:</b> + </dt> + <dd> + An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is + used). + </dd> + <dd> + Whatever <code>T::T(const T&)</code> throws. + </dd> + </dl> + <dl> + <dt> + <b>Exception Safety:</b> + </dt> + <dd> + Basic. + </dd> + </dl> + <dl> + <dt> + <b>Iterator Invalidation:</b> + </dt> + <dd> + Invalidates all iterators pointing to the <code>circular_buffer_space_optimized</code> (except + iterators equal to <a href= + "circular_buffer.html#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>). + </dd> + </dl> + <dl> + <dt> + <b>Complexity:</b> + </dt> + <dd> + Linear (in the <code>std::distance(first, last)</code>). + </dd> + </dl> + <dl> + <dt> + <b>See Also:</b> + </dt> + <dd> + <code><a href= + "#classboost_1_1circular__buffer__space__optimized_177e35432c5e69b7a16ef7d937950e7a8">operator=</a></code>, + <code><a href= + "#classboost_1_1circular__buffer__space__optimized_17ca4fda9526d0dad99706763c3b2d9f1">assign(size_type, + const_reference)</a></code>, <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1108055ae3f6b1635e1428b0455902cbf">assign(capacity_type, + size_type, const_reference)</a></code>, <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1e9347091d2d644854af0821d4b46869b">assign(capacity_type, + InputIterator, InputIterator)</a></code> + </dd> + </dl> </td> </tr> <tr> @@ -1970,9 +2076,131 @@ "#classboost_1_1circular__buffer__space__optimized_1e805212e7de49dcb60f2cad1ef304bb3">capacity_type</a> capacity_ctrl, InputIterator first, InputIterator last);</b></code><br> <br> - See the <a href="circular_buffer.html#classboost_1_1circular__buffer">circular_buffer</a> source - documentation.<br> - <br> + Assign a copy of the range into the space optimized circular buffer specifying the capacity. + <p> + The capacity of the <code>circular_buffer_space_optimized</code> will be set to the specified value and + the content of the <code>circular_buffer_space_optimized</code> will be removed and replaced with copies + of elements from the specified range. + </p> + <dl> + <dt> + <b>Precondition:</b> + </dt> + <dd> + Valid range <code>[first, last)</code>.<br> + <code>first</code> and <code>last</code> have to meet the requirements of <a href= + "http://www.sgi.com/tech/stl/InputIterator.html">InputIterator</a>. + </dd> + </dl> + <dl> + <dt> + <b>Effect:</b> + </dt> + <dd> + <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a> == + capacity_ctrl && <a href= + "circular_buffer.html#classboost_1_1circular__buffer_15fa0edd153e2591dd6bf070eb663ee32">size()</a> + <= std::distance(first, last) && (*this)[0]== *(last - capacity) && (*this)[1] == + *(last - capacity + 1) && ... && (*this)[capacity - 1] == *(last - 1)</code><br> + <br> + If the number of items to be copied 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.<br> + <br> + The amount of allocated memory will be <code>max[std::distance(first, last), + capacity_ctrl.min_capacity()]</code>. + </dd> + </dl> + <dl> + <dt> + <b>Parameter(s):</b> + </dt> + <dd> + <dl compact> + <dt> + <code>capacity_ctrl</code> + </dt> + <dd> + The new capacity controller. + </dd> + </dl> + </dd> + <dd> + <dl compact> + <dt> + <code>first</code> + </dt> + <dd> + The beginning of the range to be copied. + </dd> + </dl> + </dd> + <dd> + <dl compact> + <dt> + <code>last</code> + </dt> + <dd> + The end of the range to be copied. + </dd> + </dl> + </dd> + </dl> + <dl> + <dt> + <b>Throws:</b> + </dt> + <dd> + An allocation error if memory is exhausted (<code>std::bad_alloc</code> if the standard allocator is + used). + </dd> + <dd> + Whatever <code>T::T(const T&)</code> throws. + </dd> + </dl> + <dl> + <dt> + <b>Exception Safety:</b> + </dt> + <dd> + Basic. + </dd> + </dl> + <dl> + <dt> + <b>Iterator Invalidation:</b> + </dt> + <dd> + Invalidates all iterators pointing to the <code>circular_buffer_space_optimized</code> (except + iterators equal to <a href= + "circular_buffer.html#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>). + </dd> + </dl> + <dl> + <dt> + <b>Complexity:</b> + </dt> + <dd> + Linear (in the <code>std::distance(first, last)</code>). + </dd> + </dl> + <dl> + <dt> + <b>See Also:</b> + </dt> + <dd> + <code><a href= + "#classboost_1_1circular__buffer__space__optimized_177e35432c5e69b7a16ef7d937950e7a8">operator=</a></code>, + <code><a href= + "#classboost_1_1circular__buffer__space__optimized_17ca4fda9526d0dad99706763c3b2d9f1">assign(size_type, + const_reference)</a></code>, <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1108055ae3f6b1635e1428b0455902cbf">assign(capacity_type, + size_type, const_reference)</a></code>, <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1417de2c2419c44d83a92c463762df5fb">assign(InputIterator, + InputIterator)</a></code> + </dd> + </dl> </td> </tr> <tr> |