MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
formats.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <bsoncxx/vector/formats-fwd.hpp> // IWYU pragma: export
18
19//
20
21#include <array> // IWYU pragma: keep: backward compatibility, to be removed.
22#include <cstddef>
23#include <cstdint>
24
25#include <bsoncxx/types-fwd.hpp>
26#include <bsoncxx/vector/accessor-fwd.hpp> // IWYU pragma: keep: backward compatibility, to be removed.
27
29
30namespace bsoncxx {
31namespace v_noabi {
32namespace vector {
33namespace formats {
34
36struct f_float32 {
37 static BSONCXX_ABI_EXPORT_CDECL(std::uint32_t) length_for_append(std::size_t element_count);
38 static BSONCXX_ABI_EXPORT_CDECL(void)
39 write_frame(std::uint8_t* binary_data, std::uint32_t binary_data_length, std::size_t element_count);
40 static BSONCXX_ABI_EXPORT_CDECL(void) validate(types::b_binary const& binary);
41};
42
44struct f_int8 {
45 static BSONCXX_ABI_EXPORT_CDECL(std::uint32_t) length_for_append(std::size_t element_count);
46 static BSONCXX_ABI_EXPORT_CDECL(void)
47 write_frame(std::uint8_t* binary_data, std::uint32_t binary_data_length, std::size_t element_count);
48 static BSONCXX_ABI_EXPORT_CDECL(void) validate(types::b_binary const& binary);
49};
50
53 static BSONCXX_ABI_EXPORT_CDECL(std::uint32_t) length_for_append(std::size_t element_count);
54 static BSONCXX_ABI_EXPORT_CDECL(void)
55 write_frame(std::uint8_t* binary_data, std::uint32_t binary_data_length, std::size_t element_count);
56 static BSONCXX_ABI_EXPORT_CDECL(void) validate(types::b_binary const& binary);
57};
58
59} // namespace formats
60} // namespace vector
61} // namespace v_noabi
62} // namespace bsoncxx
63
65
Declares bsoncxx::v_noabi::vector::accessor.
#define BSONCXX_ABI_EXPORT_CDECL(...)
Equivalent to BSONCXX_ABI_EXPORT with BSONCXX_ABI_CDECL.
Definition export.hpp:52
The bsoncxx v_noabi macro guard postlude header.
The bsoncxx v_noabi macro guard prelude header.
Declares entities in bsoncxx::v_noabi::vector::formats.
Declares supported BSON Binary Vector formats.
Declarations related to the BSON Binary Vector subtype.
Declares entities whose ABI stability is NOT guaranteed.
The top-level namespace within which all bsoncxx library entities are declared.
A BSON binary data value.
Definition types.hpp:268
Vector format for 32-bit floating point elements, packed least significant byte first.
Definition formats.hpp:36
Vector format for signed 8-bit integer elements.
Definition formats.hpp:44
Vector format for single bit elements, packed most significant bit first.
Definition formats.hpp:52
Declares entities used to represent BSON types.