21#include <bsoncxx/array/value.hpp>
22#include <bsoncxx/array/view.hpp>
23#include <bsoncxx/document/value.hpp>
24#include <bsoncxx/document/view.hpp>
25#include <bsoncxx/stdx/string_view.hpp>
26#include <bsoncxx/types.hpp>
28#include <bsoncxx/config/prelude.hpp>
31BSONCXX_INLINE_NAMESPACE_BEGIN
44 class BSONCXX_PRIVATE impl;
52 explicit core(
bool is_array);
55 core& operator=(
core&& rhs)
noexcept;
238 template <
typename T>
240 static_assert(std::is_same<typename std::remove_const<T>::type,
char>::value,
241 "append is disabled for non-char pointer types");
336 std::unique_ptr<impl> _impl;
340BSONCXX_INLINE_NAMESPACE_END
343#include <bsoncxx/config/postlude.hpp>
A read-only BSON array that owns its underlying buffer.
Definition value.hpp:34
A read-only, non-owning view of a BSON document.
Definition view.hpp:33
A low-level interface for constructing BSON documents and arrays.
Definition core.hpp:42
void append(const types::b_maxkey &value)
Append a BSON max-key.
void append(const types::b_minkey &value)
Append a BSON min-key.
void append(const types::b_oid &value)
Append a BSON ObjectId.
void append(const types::b_int64 &value)
Append a BSON 64-bit signed integer.
void append(const types::b_symbol &value)
Append a BSON symbol.
void append(std::int64_t value)
Append a native int64_t as a BSON 64-bit signed integer.
void append(const types::b_code &value)
Append a BSON JavaScript code.
void append(stdx::string_view str)
Append a string view as a BSON UTF-8 string.
void append(std::string str)
Append a STL string as a BSON UTF-8 string.
void append(const oid &value)
Append an oid as a BSON ObjectId.
document::view view_document() const
Get a view over the document.
void append(const types::b_bool &value)
Append a BSON boolean.
void close_document()
Closes the current sub-document within this BSON datum.
void key_view(stdx::string_view key)
Appends a key passed as a non-owning stdx::string_view.
void append(const types::b_binary &value)
Append a BSON binary datum.
void append(array::view view)
Append the given array view.
void append(decimal128 value)
Append a decimal128 object as a BSON Decimal128.
void append(double value)
Append a native double as a BSON double.
void append(const types::b_null &value)
Append a BSON null.
void concatenate(const document::view &view)
Appends the keys from a BSON document into this BSON datum.
void append(const types::b_dbpointer &value)
Append a BSON DBPointer.
void append(const types::b_date &value)
Append a BSON date.
core(bool is_array)
Constructs an empty BSON datum.
void open_document()
Opens a sub-document within this BSON datum.
void append(const types::b_timestamp &value)
Append a BSON replication timestamp.
void append(const types::value &value)
Append a BSON variant value.
void append(const types::b_double &value)
Append a BSON double.
void append(const types::b_regex &value)
Append a BSON regex.
void append(const types::b_decimal128 &value)
Append a BSON Decimal128.
void append(T *v)
Append a char* or const char*.
Definition core.hpp:239
void append(document::view view)
Append the given document view.
void append(const types::b_array &value)
Append a BSON array.
void append(const types::b_undefined &value)
Append a BSON undefined.
void close_array()
Closes the current sub-array within this BSON datum.
void append(const types::b_codewscope &value)
Append a BSON JavaScript code with scope.
void append(std::int32_t value)
Append a native int32_t as a BSON 32-bit signed integer.
array::view view_array() const
Get a view over the array.
void append(const types::b_utf8 &value)
Append a BSON UTF-8 string.
void open_array()
Opens a sub-array within this BSON datum.
document::value extract_document()
Transfer ownership of the underlying document to the caller.
void append(const types::b_int32 &value)
Append a BSON 32-bit signed integer.
array::value extract_array()
Transfer ownership of the underlying document to the caller.
void clear()
Delete the contents of the underlying BSON datum.
void key_owned(std::string key)
Appends a key passed as a STL string.
void append(const types::b_document &value)
Append a BSON document.
void append(bool value)
Append a native boolean as a BSON boolean.
Represents an IEEE 754-2008 BSON Decimal128 value in a platform-independent way.
Definition decimal128.hpp:30
A read-only BSON document that owns its underlying buffer.
Definition value.hpp:33
A read-only, non-owning view of a BSON document.
Definition view.hpp:33
Represents a MongoDB ObjectId.
Definition oid.hpp:38
A variant that can contain any BSON type.
Definition value.hpp:37
Top level namespace for MongoDB C++ BSON functionality.
Definition element.hpp:24
A BSON array value.
Definition types.hpp:180
A BSON binary data value.
Definition types.hpp:205
A BSON boolean value.
Definition types.hpp:263
A BSON JavaScript code value.
Definition types.hpp:420
A BSON JavaScript code with scope value.
Definition types.hpp:499
A BSON date value.
Definition types.hpp:288
A BSON DBPointer value.
Definition types.hpp:401
A BSON Decimal128 value.
Definition types.hpp:605
A BSON document value.
Definition types.hpp:148
A BSON double value.
Definition types.hpp:85
A BSON signed 32-bit integer value.
Definition types.hpp:532
A BSON 64-bit signed integer value.
Definition types.hpp:580
A BSON max-key value.
Definition types.hpp:652
A BSON min-key value.
Definition types.hpp:636
A BSON null value.
Definition types.hpp:349
A BSON ObjectId value.
Definition types.hpp:245
A BSON regex value.
Definition types.hpp:365
A BSON Symbol value.
Definition types.hpp:461
A BSON replication timestamp value.
Definition types.hpp:561
A BSON undefined value.
Definition types.hpp:229
A BSON UTF-8 encoded string value.
Definition types.hpp:110