|
From: Jan G. <jan...@us...> - 2007-04-15 22:52:35
|
Update of /cvsroot/boost-sandbox/boost-sandbox/libs/circular_buffer/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4782/libs/circular_buffer/doc Modified Files: circular_buffer.html circular_buffer_space_optimized.html Log Message: circular_buffer: updated srcdoc and test cases Index: circular_buffer.html =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/circular_buffer/doc/circular_buffer.html,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- circular_buffer.html 9 Apr 2007 22:06:13 -0000 1.64 +++ circular_buffer.html 15 Apr 2007 22:52:33 -0000 1.65 @@ -3131,7 +3131,8 @@ <dd> Invalidates all iterators pointing to the <code>circular_buffer</code> (except iterators equal to <a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>); does not - invalidate any iterators if the postcondition is already met prior calling this method. + invalidate any iterators if the postcondition (the <i>Effect</i>) is already met prior calling this + method. </dd> </dl> <dl> @@ -3139,7 +3140,8 @@ <b>Complexity:</b> </dt> <dd> - Linear (in the size of the <code>circular_buffer</code>); constant if the postcondition is already met. + Linear (in the size of the <code>circular_buffer</code>); constant if the postcondition (the + <i>Effect</i>) is already met. </dd> </dl> <dl> @@ -3979,7 +3981,8 @@ <b>Iterator Invalidation:</b> </dt> <dd> - Invalidates all iterators pointing to this <code>circular_buffer</code>. + Invalidates all iterators pointing to this <code>circular_buffer</code> (except iterators equal to + <a href="#classboost_1_1circular__buffer_1babfa093dad7801223b80626b598dee1">end()</a>). </dd> </dl> <dl> @@ -4081,7 +4084,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> @@ -4117,7 +4121,7 @@ "#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item);</b></code><br> <br> - Assign <code>n</code> items into the <code>circular_buffer</code> with the specified capacity. + Assign <code>n</code> items into the <code>circular_buffer</code> specifying the capacity. <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 <code>n</code> copies of the @@ -4153,7 +4157,7 @@ <code>capacity</code> </dt> <dd> - The new capacity of the <code>circular_buffer</code>. + The new capacity. </dd> </dl> </dd> @@ -4203,7 +4207,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> @@ -4350,7 +4355,7 @@ "#classboost_1_1circular__buffer_1dc642ff2be4db0be1a457810e5d09595">capacity_type</a> capacity, InputIterator first, InputIterator last);</b></code><br> <br> - Assign a copy of the range into the <code>circular_buffer</code> with the specified capacity. + Assign a copy of the range into the <code>circular_buffer</code> specifying the capacity. <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 @@ -4392,7 +4397,7 @@ <code>capacity</code> </dt> <dd> - The new capacity of the <code>circular_buffer</code>. + The new capacity. </dd> </dl> </dd> 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.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- circular_buffer_space_optimized.html 9 Apr 2007 22:06:14 -0000 1.38 +++ circular_buffer_space_optimized.html 15 Apr 2007 22:52:34 -0000 1.39 @@ -1622,8 +1622,88 @@ "classboost_1_1circular__buffer__space__optimized_177e35432c5e69b7a16ef7d937950e7a8"></a><code><b>circular_buffer_space_optimized<T,Alloc>& operator=(const circular_buffer_space_optimized<T,Alloc>& cb);</b></code><br> <br> - TODO doc.<br> - <br> + The assign operator. + <p> + Makes this <code>circular_buffer_space_optimized</code> to become a copy of the specified + <code>circular_buffer_space_optimized</code>. + </p> + <dl> + <dt> + <b>Effect:</b> + </dt> + <dd> + <code>*this == cb</code> + </dd> + </dl> + <dl> + <dt> + <b>Parameter(s):</b> + </dt> + <dd> + <dl compact> + <dt> + <code>cb</code> + </dt> + <dd> + The <code>circular_buffer_space_optimized</code> 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> + Strong. + </dd> + </dl> + <dl> + <dt> + <b>Iterator Invalidation:</b> + </dt> + <dd> + Invalidates all iterators pointing to this <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 size of <code>cb</code>). + </dd> + </dl> + <dl> + <dt> + <b>See Also:</b> + </dt> + <dd> + <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>, <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1e9347091d2d644854af0821d4b46869b">assign(capacity_type, + InputIterator, InputIterator)</a></code> + </dd> + </dl> </td> </tr> <tr> @@ -1636,9 +1716,105 @@ "circular_buffer.html#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item);</b></code><br> <br> - See the <a href="circular_buffer.html#classboost_1_1circular__buffer">circular_buffer</a> source - documentation.<br> - <br> + Assign <code>n</code> items into the space optimized circular buffer. + <p> + The content of the <code>circular_buffer_space_optimized</code> will be removed and replaced with + <code>n</code> copies of the <code>item</code>. + </p> + <dl> + <dt> + <b>Effect:</b> + </dt> + <dd> + <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1aa2695c84ac9fc912e28d1a5920dadfa">capacity()</a>.capacity() + == n && <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> == n + && (*this)[0] == item && (*this)[1] == item && ... && (*this) [n - 1] + == item</code> + </dd> + </dl> + <dl> + <dt> + <b>Parameter(s):</b> + </dt> + <dd> + <dl compact> + <dt> + <code>n</code> + </dt> + <dd> + The number of elements the <code>circular_buffer_space_optimized</code> will be filled with. + </dd> + </dl> + </dd> + <dd> + <dl compact> + <dt> + <code>item</code> + </dt> + <dd> + The element the <code>circular_buffer_space_optimized</code> will be filled with. + </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>n</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_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>, <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1e9347091d2d644854af0821d4b46869b">assign(capacity_type, + InputIterator, InputIterator)</a></code> + </dd> + </dl> </td> </tr> <tr> @@ -1653,9 +1829,124 @@ "circular_buffer.html#classboost_1_1circular__buffer_1a8397191092f5bacee991b623ca4b910">const_reference</a> item);</b></code><br> <br> - See the <a href="circular_buffer.html#classboost_1_1circular__buffer">circular_buffer</a> source - documentation.<br> - <br> + Assign <code>n</code> items 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 + <code>n</code> copies of the <code>item</code>. + </p> + <dl> + <dt> + <b>Precondition:</b> + </dt> + <dd> + <code>capacity_ctrl.capacity() >= n</code> + </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> == n + && (*this)[0] == item && (*this)[1] == item && ... && (*this) [n - 1] + == item</code><br> + <br> + The amount of allocated memory will be <code>max[n, 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>n</code> + </dt> + <dd> + The number of elements the <code>circular_buffer_space_optimized</code> will be filled with. + </dd> + </dl> + </dd> + <dd> + <dl compact> + <dt> + <code>item</code> + </dt> + <dd> + The element the <code>circular_buffer_space_optimized</code> will be filled with. + </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>n</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_1417de2c2419c44d83a92c463762df5fb">assign(InputIterator, + InputIterator)</a></code>, <code><a href= + "#classboost_1_1circular__buffer__space__optimized_1e9347091d2d644854af0821d4b46869b">assign(capacity_type, + InputIterator, InputIterator)</a></code> + </dd> + </dl> </td> </tr> <tr> |