MongoDB C++ Driver 4.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
18
19//
20
21#include <array>
22
23#include <bsoncxx/types-fwd.hpp>
25
27
28namespace bsoncxx {
29namespace v_noabi {
30namespace vector {
31namespace formats {
32
34struct f_float32 {
35 static BSONCXX_ABI_EXPORT_CDECL(std::uint32_t) length_for_append(std::size_t element_count);
36 static BSONCXX_ABI_EXPORT_CDECL(void)
37 write_frame(std::uint8_t* binary_data, std::uint32_t binary_data_length, std::size_t element_count);
38 static BSONCXX_ABI_EXPORT_CDECL(void) validate(types::b_binary const& binary);
39};
40
42struct f_int8 {
43 static BSONCXX_ABI_EXPORT_CDECL(std::uint32_t) length_for_append(std::size_t element_count);
44 static BSONCXX_ABI_EXPORT_CDECL(void)
45 write_frame(std::uint8_t* binary_data, std::uint32_t binary_data_length, std::size_t element_count);
46 static BSONCXX_ABI_EXPORT_CDECL(void) validate(types::b_binary const& binary);
47};
48
51 static BSONCXX_ABI_EXPORT_CDECL(std::uint32_t) length_for_append(std::size_t element_count);
52 static BSONCXX_ABI_EXPORT_CDECL(void)
53 write_frame(std::uint8_t* binary_data, std::uint32_t binary_data_length, std::size_t element_count);
54 static BSONCXX_ABI_EXPORT_CDECL(void) validate(types::b_binary const& binary);
55};
56
57} // namespace formats
58} // namespace vector
59} // namespace v_noabi
60} // namespace bsoncxx
61
63
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:227
Vector format for 32-bit floating point elements, packed least significant byte first.
Definition formats.hpp:34
Vector format for signed 8-bit integer elements.
Definition formats.hpp:42
Vector format for single bit elements, packed most significant bit first.
Definition formats.hpp:50
Declares entities used to represent BSON types.