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:

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/string/view_or_value.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace v_noabi {
2828
namespace string {
2929

3030
///
31-
/// Class representing a view-or-value variant type for strings.
31+
/// A view-or-value variant type for strings.
3232
///
3333
/// @par Derived From
3434
/// - @ref bsoncxx::v_noabi::view_or_value<stdx::string_view, std::string>

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ namespace types {
3434
namespace bson_value {
3535

3636
///
37-
/// A variant owning type that represents any BSON type. Owns its underlying
38-
/// buffer. When a bson_value::value goes out of scope, its underlying
39-
/// buffer is freed.
37+
/// An owning variant type that represents any BSON type.
38+
///
39+
/// Owns its underlying buffer. When a bson_value::value goes out of scope, its underlying buffer is
40+
/// freed.
4041
///
4142
/// For accessors into this type and to extract the various BSON types out,
4243
/// please use bson_value::view.

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ namespace bsoncxx {
4444
namespace v_noabi {
4545
namespace types {
4646
namespace bson_value {
47+
4748
///
48-
/// A view-only variant that can contain any BSON type.
49+
/// A non-owning variant that can contain any BSON type.
4950
///
5051
/// @warning
5152
/// Calling the wrong get_<type> method will cause an exception

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/validate.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ validate(
7272
std::size_t* invalid_offset = nullptr);
7373

7474
///
75-
/// A validator is used to enable or disable specific checks that can be
76-
/// performed during BSON validation.
75+
/// Used to toggle checks which may be performed during BSON validation.
7776
///
7877
class validator {
7978
public:

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/view_or_value.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace bsoncxx {
2626
namespace v_noabi {
2727

2828
///
29-
/// Class representing a view-or-value variant type.
29+
/// A view-or-value variant type.
3030
///
3131
template <typename View, typename Value>
3232
class view_or_value {
@@ -35,12 +35,12 @@ class view_or_value {
3535
using value_type = Value;
3636

3737
///
38-
/// Class View must be constructible from an instance of class Value.
38+
/// View must be constructible from an instance of class Value.
3939
///
4040
static_assert(std::is_constructible<View, Value>::value, "View type must be constructible from a Value");
4141

4242
///
43-
/// Class View must be default constructible.
43+
/// View must be default constructible.
4444
///
4545
static_assert(std::is_default_constructible<View>::value, "View type must be default constructible");
4646

src/mongocxx/include/mongocxx/v_noabi/mongocxx/bulk_write.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace mongocxx {
2828
namespace v_noabi {
2929

3030
///
31-
/// Class representing a batch of write operations that can be sent to the server as a group.
31+
/// A batch of write operations that can be sent to the server as a group.
3232
///
3333
/// If you have a lot of write operations to execute, it can be more efficient to send them as
3434
/// part of a bulk_write in order to avoid unnecessary network-level round trips between the driver

src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace mongocxx {
3030
namespace v_noabi {
3131

3232
///
33-
/// Class representing a MongoDB change stream.
33+
/// A MongoDB change stream.
3434
///
3535
class change_stream {
3636
public:
@@ -124,7 +124,7 @@ class change_stream {
124124
};
125125

126126
///
127-
/// Class representing a MongoDB change stream iterator.
127+
/// A MongoDB change stream iterator.
128128
///
129129
class change_stream::iterator {
130130
public:

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace mongocxx {
4141
namespace v_noabi {
4242

4343
///
44-
/// Class representing a client connection to MongoDB.
44+
/// A client connection to a MongoDB server.
4545
///
4646
/// Acts as a logical gateway for working with databases contained within a MongoDB server.
4747
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client_encryption.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace mongocxx {
3737
namespace v_noabi {
3838

3939
///
40-
/// Class supporting operations for MongoDB Client-Side Field Level Encryption.
40+
/// Supports MongoDB Client-Side Field Level Encryption operations.
4141
///
4242
class client_encryption {
4343
public:

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client_session.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
namespace mongocxx {
3636
namespace v_noabi {
3737

38+
///
39+
/// Supports MongoDB client session operations.
3840
///
3941
/// Use a session for a sequence of operations, optionally with either causal consistency
4042
/// or snapshots.

src/mongocxx/include/mongocxx/v_noabi/mongocxx/collection.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ namespace mongocxx {
7171
namespace v_noabi {
7272

7373
///
74-
/// Class representing server side document groupings within a MongoDB database.
74+
/// A MongoDB collection.
7575
///
7676
/// Collections do not require or enforce a schema and documents inside of a collection can have
7777
/// different fields. While not a requirement, typically documents in a collection have a similar

src/mongocxx/include/mongocxx/v_noabi/mongocxx/cursor.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace mongocxx {
3333
namespace v_noabi {
3434

3535
///
36-
/// Class representing a pointer to the result set of a query on a MongoDB server.
36+
/// A cursor over the documents returned by a query to a MongoDB server.
3737
///
3838
/// Clients can iterate through a cursor::iterator to retrieve results.
3939
///
@@ -104,7 +104,7 @@ class cursor {
104104
};
105105

106106
///
107-
/// Class representing an input iterator of documents in a MongoDB cursor
107+
/// An input iterator of documents in a MongoDB cursor
108108
/// result set.
109109
///
110110
/// All non-end iterators derived from the same mongocxx::v_noabi::cursor move in

src/mongocxx/include/mongocxx/v_noabi/mongocxx/database.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace mongocxx {
3838
namespace v_noabi {
3939

4040
///
41-
/// Class representing a MongoDB database.
41+
/// A MongoDB database.
4242
///
4343
/// Acts as a gateway for accessing collections that are contained within a database. It inherits
4444
/// all of its default settings from the client that creates it.

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_failed_event.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ namespace v_noabi {
2929
namespace events {
3030

3131
///
32-
/// An event notification sent when the driver fails to execute a MongoDB command.
32+
/// The failed execution of a MongoDB command.
3333
///
3434
/// @see
35-
/// - "CommandFailedEvent" in https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.md
35+
/// - [Command Logging and Monitoring (MongoDB Specifications)](https://specifications.readthedocs.io/en/latest/command-logging-and-monitoring/command-logging-and-monitoring/)
3636
///
3737
class command_failed_event {
3838
public:

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_started_event.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ namespace v_noabi {
2929
namespace events {
3030

3131
///
32-
/// An event notification sent when the driver begins executing a MongoDB command.
32+
/// The start of the execution of a MongoDB command.
3333
///
3434
/// @see
35-
/// - "CommandStartedEvent" in https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.md
35+
/// - [Command Logging and Monitoring (MongoDB Specifications)](https://specifications.readthedocs.io/en/latest/command-logging-and-monitoring/command-logging-and-monitoring/)
3636
///
3737
class command_started_event {
3838
public:

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_succeeded_event.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ namespace v_noabi {
2929
namespace events {
3030

3131
///
32-
/// An event notification sent when the driver successfully executes a MongoDB command.
32+
/// The successful execution of a MongoDB command.
3333
///
3434
/// @see
35-
/// - "CommandSucceededEvent" in https://github.com/mongodb/specifications/blob/master/source/command-logging-and-monitoring/command-logging-and-monitoring.md
35+
/// - [Command Logging and Monitoring (MongoDB Specifications)](https://specifications.readthedocs.io/en/latest/command-logging-and-monitoring/command-logging-and-monitoring/)
3636
///
3737
class command_succeeded_event {
3838
public:

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/heartbeat_failed_event.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ namespace v_noabi {
2828
namespace events {
2929

3030
///
31-
/// An event notification sent when the driver failed to send an "hello" command to check the
32-
/// status of a server.
31+
/// The failed execution of a heartbeat ("hello") command.
3332
///
3433
/// @see
35-
/// - "ServerHeartbeatFailedEvent" in https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md
34+
/// - [SDAM Logging and Monitoring Specification (MongoDB Specifications)](https://specifications.readthedocs.io/en/latest/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring/)
3635
///
3736
class heartbeat_failed_event {
3837
public:

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/heartbeat_started_event.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@ namespace v_noabi {
2727
namespace events {
2828

2929
///
30-
/// An event notification sent when the driver begins executing a "hello" command to check the
31-
/// status of a server.
30+
/// The start of the execution of a heartbeat ("hello") command.
3231
///
3332
/// @see
34-
/// - "ServerHeartbeatStartedEvent" in https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md
33+
/// - [SDAM Logging and Monitoring Specification (MongoDB Specifications)](https://specifications.readthedocs.io/en/latest/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring/)
3534
///
3635
class heartbeat_started_event {
3736
public:

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/heartbeat_succeeded_event.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@ namespace v_noabi {
2626
namespace events {
2727

2828
///
29-
/// An event notification sent when the driver completes a "hello" command to check the status
30-
/// of a server.
29+
/// The successful execution of a heartbeat ("hello") command.
3130
///
3231
/// @see
33-
/// - "ServerHeartbeatSucceededEvent" in https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md
32+
/// - [SDAM Logging and Monitoring Specification (MongoDB Specifications)](https://specifications.readthedocs.io/en/latest/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring/)
3433
///
3534
class heartbeat_succeeded_event {
3635
public:

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/server_changed_event.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ namespace v_noabi {
2828
namespace events {
2929

3030
///
31-
/// An event notification sent when the driver observes a change in the status of a server it is
32-
/// connected to.
31+
/// A change in the description of a connected MongoDB server.
3332
///
3433
/// @see
35-
/// - "ServerDescriptionChangedEvent" in https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.md
34+
/// - [SDAM Logging and Monitoring Specification (MongoDB Specifications)](https://specifications.readthedocs.io/en/latest/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring/)
3635
///
3736
class server_changed_event {
3837
public:

0 commit comments

Comments
 (0)