Skip to content

Commit 6efdd4e

Browse files
committed
Complete Javadoc coverage and rule compliance for public headers
Add missing Javadoc to undocumented public declarations across buffers, io_result, read_until, cond, error, and concept headers. Fix rule compliance: correct section order (@Par before @tparam), rename @Par Usage to @Par Example, and standardize brief verbs (constructors start with "Construct", assignments with "Assign").
1 parent 3e70dd9 commit 6efdd4e

30 files changed

+196
-69
lines changed

include/boost/capy/buffers.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ class mutable_buffer
7474
/// Construct an empty buffer.
7575
mutable_buffer() = default;
7676

77-
/// Copy constructor.
77+
/// Construct a copy.
7878
mutable_buffer(
7979
mutable_buffer const&) = default;
8080

81-
/// Copy assignment.
81+
/// Assign by copying.
8282
mutable_buffer& operator=(
8383
mutable_buffer const&) = default;
8484

@@ -166,10 +166,10 @@ class const_buffer
166166
/// Construct an empty buffer.
167167
const_buffer() = default;
168168

169-
/// Copy constructor.
169+
/// Construct a copy.
170170
const_buffer(const_buffer const&) = default;
171171

172-
/// Copy assignment.
172+
/// Assign by copying.
173173
const_buffer& operator=(
174174
const_buffer const& other) = default;
175175

include/boost/capy/buffers/buffer_array.hpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,17 @@ buffer_array_keep_prefix(
6565
It provides efficient storage for small buffer sequences
6666
without dynamic allocation.
6767
68-
@tparam N Maximum number of buffers the array can hold.
69-
@tparam IsConst If true, holds const_buffer; otherwise mutable_buffer.
70-
71-
@par Usage
72-
68+
@par Example
7369
@code
7470
void process(ConstBufferSequence auto const& buffers)
7571
{
7672
const_buffer_array<4> bufs(buffers);
7773
// use bufs.begin(), bufs.end(), bufs.to_span()
7874
}
7975
@endcode
76+
77+
@tparam N Maximum number of buffers the array can hold.
78+
@tparam IsConst If true, holds const_buffer; otherwise mutable_buffer.
8079
*/
8180
template<std::size_t N, bool IsConst>
8281
class buffer_array
@@ -95,7 +94,7 @@ class buffer_array
9594
};
9695

9796
public:
98-
/** Default constructor.
97+
/** Construct a default instance.
9998
10099
Constructs an empty buffer array.
101100
*/
@@ -104,7 +103,7 @@ class buffer_array
104103
{
105104
}
106105

107-
/** Copy constructor.
106+
/** Construct a copy.
108107
*/
109108
buffer_array(buffer_array const& other) noexcept
110109
: n_(other.n_)
@@ -252,7 +251,7 @@ class buffer_array
252251
arr_[n_].~value_type();
253252
}
254253

255-
/** Copy assignment.
254+
/** Assign by copying.
256255
*/
257256
buffer_array&
258257
operator=(buffer_array const& other) noexcept

include/boost/capy/buffers/buffer_pair.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ namespace capy {
2121
*/
2222
using const_buffer_pair = std::array<const_buffer,2>;
2323

24+
/// Slice customization point for const_buffer_pair.
2425
BOOST_CAPY_DECL
2526
void
2627
tag_invoke(
@@ -33,6 +34,7 @@ tag_invoke(
3334
*/
3435
using mutable_buffer_pair = std::array<mutable_buffer,2>;
3536

37+
/// Slice customization point for mutable_buffer_pair.
3638
BOOST_CAPY_DECL
3739
void
3840
tag_invoke(

include/boost/capy/buffers/buffer_param.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ namespace capy {
6767
@ref max_size buffer descriptors, automatically refilling
6868
from the underlying sequence as buffers are consumed.
6969
70-
@par Usage
70+
@par Example
7171
7272
Create a `buffer_param` from any buffer sequence and use
7373
`data()` to get the current window of buffers. After

include/boost/capy/buffers/circular_dynamic_buffer.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class circular_dynamic_buffer
7070
/// Construct an empty circular buffer with zero capacity.
7171
circular_dynamic_buffer() = default;
7272

73-
/// Copy constructor.
73+
/// Construct a copy.
7474
circular_dynamic_buffer(
7575
circular_dynamic_buffer const&) = default;
7676

@@ -110,7 +110,7 @@ class circular_dynamic_buffer
110110
detail::throw_invalid_argument();
111111
}
112112

113-
/// Copy assignment.
113+
/// Assign by copying.
114114
circular_dynamic_buffer& operator=(
115115
circular_dynamic_buffer const&) = default;
116116

include/boost/capy/buffers/consuming_buffers.hpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class consuming_buffers
129129
// Default constructor required for forward_iterator
130130
const_iterator() noexcept = default;
131131

132+
/// Construct from position and consumed byte count.
132133
const_iterator(
133134
iterator_type it,
134135
end_iterator_type end,
@@ -139,17 +140,19 @@ class consuming_buffers
139140
{
140141
}
141142

143+
/// Test for equality.
142144
bool operator==(const_iterator const& other) const noexcept
143145
{
144146
return it_ == other.it_ && consumed_ == other.consumed_;
145147
}
146148

147-
// != operator required for equality_comparable
149+
/// Test for inequality.
148150
bool operator!=(const_iterator const& other) const noexcept
149151
{
150152
return !(*this == other);
151153
}
152154

155+
/// Return the current buffer, adjusted for consumed bytes.
153156
value_type operator*() const noexcept
154157
{
155158
auto const& buf = *it_;
@@ -167,20 +170,23 @@ class consuming_buffers
167170
}
168171
}
169172

173+
/// Advance to the next element.
170174
const_iterator& operator++() noexcept
171175
{
172176
consumed_ = 0;
173177
++it_;
174178
return *this;
175179
}
176180

181+
/// Advance to the next element (postfix).
177182
const_iterator operator++(int) noexcept
178183
{
179184
const_iterator tmp = *this;
180185
++*this;
181186
return tmp;
182187
}
183188

189+
/// Move to the previous element.
184190
const_iterator& operator--() noexcept
185191
{
186192
if (consumed_ == 0)
@@ -201,6 +207,7 @@ class consuming_buffers
201207
return *this;
202208
}
203209

210+
/// Move to the previous element (postfix).
204211
const_iterator operator--(int) noexcept
205212
{
206213
const_iterator tmp = *this;

include/boost/capy/buffers/flat_dynamic_buffer.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ class flat_dynamic_buffer
8989
detail::throw_invalid_argument();
9090
}
9191

92-
/// Copy constructor.
92+
/// Construct a copy.
9393
flat_dynamic_buffer(
9494
flat_dynamic_buffer const&) = default;
9595

96-
/// Copy assignment.
96+
/// Assign by copying.
9797
flat_dynamic_buffer& operator=(
9898
flat_dynamic_buffer const&) = default;
9999

include/boost/capy/buffers/front.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ namespace capy {
2020
*/
2121
constexpr struct front_mrdocs_workaround_t
2222
{
23+
/// Return the first mutable buffer, or an empty buffer.
2324
template<MutableBufferSequence MutableBufferSequence>
2425
mutable_buffer
2526
operator()(
@@ -31,6 +32,7 @@ constexpr struct front_mrdocs_workaround_t
3132
return {};
3233
}
3334

35+
/// Return the first const buffer, or an empty buffer.
3436
template<ConstBufferSequence ConstBufferSequence>
3537
requires (!MutableBufferSequence<ConstBufferSequence>)
3638
const_buffer

include/boost/capy/buffers/slice.hpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@ using slice_type = std::conditional_t<
4646

4747
//------------------------------------------------
4848

49-
/** A wrapper enabling a buffer sequence to be consumed
49+
/** A view of a sub-range of a buffer sequence.
50+
51+
This class wraps a buffer sequence and presents a
52+
contiguous byte sub-range by adjusting the first and
53+
last buffers. The prefix and suffix can be removed or
54+
kept using the free functions @ref keep_prefix,
55+
@ref remove_prefix, etc.
56+
57+
@see keep_prefix, remove_prefix, prefix, sans_prefix
5058
*/
5159
template<ConstBufferSequence BufferSequence>
5260
class slice_of<BufferSequence>
@@ -118,6 +126,7 @@ class slice_of<BufferSequence>
118126

119127
const_iterator() = default;
120128

129+
/// Test for equality.
121130
bool
122131
operator==(
123132
const_iterator const& other) const noexcept
@@ -130,13 +139,15 @@ class slice_of<BufferSequence>
130139
n_ == other.n_;
131140
}
132141

142+
/// Test for inequality.
133143
bool
134144
operator!=(
135145
const_iterator const& other) const noexcept
136146
{
137147
return !(*this == other);
138148
}
139149

150+
/// Return the current buffer, adjusted for prefix/suffix.
140151
reference
141152
operator*() const noexcept
142153
{
@@ -156,6 +167,7 @@ class slice_of<BufferSequence>
156167
return value_type(p, n);
157168
}
158169

170+
/// Advance to the next element.
159171
const_iterator&
160172
operator++() noexcept
161173
{
@@ -165,6 +177,7 @@ class slice_of<BufferSequence>
165177
return *this;
166178
}
167179

180+
/// Advance to the next element (postfix).
168181
const_iterator
169182
operator++(int) noexcept
170183
{
@@ -173,6 +186,7 @@ class slice_of<BufferSequence>
173186
return temp;
174187
}
175188

189+
/// Move to the previous element.
176190
const_iterator&
177191
operator--() noexcept
178192
{
@@ -182,6 +196,7 @@ class slice_of<BufferSequence>
182196
return *this;
183197
}
184198

199+
/// Move to the previous element (postfix).
185200
const_iterator
186201
operator--(int) noexcept
187202
{
@@ -232,6 +247,7 @@ class slice_of<BufferSequence>
232247
end_iter_impl(), prefix_, suffix_, len_, len_);
233248
}
234249

250+
/// Slice customization point for this type.
235251
friend
236252
void
237253
tag_invoke(

0 commit comments

Comments
 (0)