Skip to content

Commit 23eee67

Browse files
authored
Improve documentation briefs and misc. details (#1311)
1 parent 2f53a56 commit 23eee67

File tree

113 files changed

+236
-227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+236
-227
lines changed

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/value.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ namespace v_noabi {
2929
namespace array {
3030

3131
///
32-
/// A read-only BSON array that owns its underlying buffer. When a array::value goes
33-
/// out of scope, the underlying buffer is freed. Generally this class should be used
34-
/// sparingly; array::view should be used instead wherever possible.
32+
/// A read-only BSON array that owns its underlying buffer.
33+
///
34+
/// When a array::value goes out of scope, the underlying buffer is freed. Generally this class
35+
/// should be used sparingly; array::view should be used instead wherever possible.
3536
///
3637
class value {
3738
public:

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_array.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ void value_append(core* core, T&& t);
3535
} // namespace impl
3636

3737
///
38-
/// An internal class of builder::basic.
39-
/// Users should almost always construct a builder::basic::array instead.
38+
/// Represents an array element being constructed during an append operation.
39+
///
40+
/// @see
41+
/// - @ref bsoncxx::v_noabi::builder::basic::array
42+
/// - @ref bsoncxx::v_noabi::builder::basic::document
4043
///
4144
class sub_array {
4245
public:

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/basic/sub_document.hpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ void value_append(core* core, T&& t);
3737
} // namespace impl
3838

3939
///
40-
/// An internal class of builder::basic.
41-
/// Users should almost always construct a builder::basic::document instead.
40+
/// Represents a document element being constructed during an append operation.
41+
///
42+
/// @see
43+
/// - @ref bsoncxx::v_noabi::builder::basic::array
44+
/// - @ref bsoncxx::v_noabi::builder::basic::document
4245
///
4346
class sub_document {
4447
public:

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/closed_context.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ namespace builder {
2525
namespace stream {
2626

2727
///
28-
/// The closed_context, when used as a template parameter for array_context,
29-
/// value_context or key_context, indicates that the document cannot be closed
30-
/// further. This could indicate that the document is the root, or that the type
31-
/// stack has been intentionally erased, as is the case when using callbacks in
32-
/// the stream api.
28+
/// Indicates the document being constructed cannot be closed further.
29+
///
30+
/// Used as a template parameter for array_context, value_context or key_context. This could
31+
/// indicate that the document is the root, or that the type stack has been intentionally erased, as
32+
/// is the case when using callbacks in the stream api.
3333
///
3434
struct closed_context {
3535
closed_context(core*) {}

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/key_context.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ namespace builder {
3030
namespace stream {
3131

3232
///
33-
/// A stream context which expects a key, which can later be followed by
34-
/// value, then more key/value pairs.
33+
/// A stream context which expects a key.
34+
///
35+
/// This can later be followed by value, then more key/value pairs.
3536
///
3637
/// The template argument can be used to hold additional information about
3738
/// containing documents or arrays. I.e. value_context<> implies that this

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ namespace builder {
3030
namespace stream {
3131

3232
///
33-
/// A stream context which expects a value, which can later be followed by
34-
/// more key/value pairs.
33+
/// A stream context which expects a value.
34+
///
35+
/// This can later be followed by more key/value pairs.
3536
///
3637
/// The template argument can be used to hold additional information about
3738
/// containing documents or arrays. I.e. value_context<> implies that this

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/decimal128.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ namespace bsoncxx {
2727
namespace v_noabi {
2828

2929
///
30-
/// Represents an IEEE 754-2008 BSON Decimal128 value in a platform-independent way.
30+
/// Represents a MongoDB BSON Decimal128.
31+
///
32+
/// This type implements the Decimal Arithmetic Encodings (IEEE 754-2008) specification, _with certain
33+
/// exceptions_ around value integrity and the coefficient encoding. When a value cannot be represented exactly, the
34+
/// value will be rejected.
35+
///
36+
/// @see
37+
/// - [BSON Types (MongoDB Manual)](https://www.mongodb.com/docs/manual/reference/bson-types/)
38+
/// - [BSON Decimal128 (MongoDB Specifications)](https://specifications.readthedocs.io/en/latest/bson-decimal128/decimal128/)
3139
///
3240
class decimal128 {
3341
public:

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ namespace v_noabi {
3131
namespace document {
3232

3333
///
34-
/// A read-only BSON document that owns its underlying buffer. When a document::value goes
35-
/// out of scope, the underlying buffer is freed. Generally this class should be used
36-
/// sparingly; document::view should be used instead wherever possible.
34+
/// A read-only BSON document that owns its underlying buffer.
35+
///
36+
/// When a document::value goes out of scope, the underlying buffer is freed. Generally this class
37+
/// should be used sparingly; document::view should be used instead wherever possible.
3738
///
3839
class value {
3940
public:

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/exception/exception.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ BSONCXX_DISABLE_WARNING(MSVC(4251));
2828
BSONCXX_DISABLE_WARNING(MSVC(4275));
2929

3030
///
31-
/// Class representing any exceptions emitted from the bsoncxx library or
32-
/// its underlying implementation.
31+
/// Base class for all exceptions thrown by the bsoncxx library unless otherwise specified.
3332
///
3433
class exception : public std::system_error {
3534
public:

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/oid.hpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,10 @@ namespace bsoncxx {
2828
namespace v_noabi {
2929

3030
///
31-
/// Represents a MongoDB ObjectId. As this BSON type is used within the MongoDB server
32-
/// as a primary key for each document, it is useful for representing a 'pointer'
33-
/// to another document.
34-
///
35-
/// @note we use 'oid' to refer to this concrete class. We use 'ObjectId' to refer
36-
/// to the BSON type.
31+
/// Represents a MongoDB BSON ObjectId.
3732
///
3833
/// @see
39-
/// - https://www.mongodb.com/docs/manual/reference/object-id/
34+
/// - [BSON Types (MongoDB Manual)](https://www.mongodb.com/docs/manual/reference/bson-types/)
4035
///
4136
class oid {
4237
public:

0 commit comments

Comments
 (0)