19 #include <type_traits>
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>
31 BSONCXX_INLINE_NAMESPACE_BEGIN
44 class BSONCXX_PRIVATE impl;
52 explicit core(
bool is_array);
54 core(core&& rhs) noexcept;
55 core& operator=(core&& rhs) noexcept;
72 void key_view(stdx::string_view key);
81 void key_owned(std::string key);
96 void close_document();
220 void append(std::string str);
225 void append(stdx::string_view str);
233 template <
typename T>
235 static_assert(std::is_same<
typename std::remove_const<T>::type,
char>::value,
236 "append is disabled for non-char pointer types");
243 void append(
bool value);
248 void append(
double value);
253 void append(std::int32_t value);
258 void append(std::int64_t value);
263 void append(
const oid& value);
316 std::unique_ptr<impl> _impl;
320 BSONCXX_INLINE_NAMESPACE_END
323 #include <bsoncxx/config/postlude.hpp>
A low-level interface for constructing BSON documents and arrays.
Definition: core.hpp:42
A BSON signed 32-bit integer value.
Definition: types.hpp:538
A BSON double value.
Definition: types.hpp:84
A BSON JavaScript code value.
Definition: types.hpp:465
A read-only BSON array that owns its underlying buffer.
Definition: value.hpp:34
Represents a MongoDB ObjectId.
Definition: oid.hpp:38
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
A BSON null value.
Definition: types.hpp:346
A BSON regex value.
Definition: types.hpp:366
A BSON binary data value.
Definition: types.hpp:202
A BSON DBPointer value.
Definition: types.hpp:402
A BSON max-key value.
Definition: types.hpp:635
A BSON UTF-8 encoded string value.
Definition: types.hpp:109
A BSON date value.
Definition: types.hpp:286
A BSON min-key value.
Definition: types.hpp:615
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33
A BSON JavaScript code value.
Definition: types.hpp:425
A BSON JavaScript code with scope value.
Definition: types.hpp:505
A BSON 64-bit signed integer value.
Definition: types.hpp:586
A BSON replication timestamp value.
Definition: types.hpp:567
A BSON document value.
Definition: types.hpp:145
void append(T *v)
Append a char* or const char*.
Definition: core.hpp:234
A BSON boolean value.
Definition: types.hpp:261
A BSON ObjectId value.
Definition: types.hpp:243
Definition: element.hpp:24
A BSON undefined value.
Definition: types.hpp:227
A BSON array value.
Definition: types.hpp:177
A variant that can contain any BSON type.
Definition: value.hpp:37