From 86e7fb3ad4742cda6435b41a27b2526c066e8ed4 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:43 -0600 Subject: [PATCH 01/18] v1: array/element (fwd) --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 10 +++++ .../include/bsoncxx/v1/array/element-fwd.hpp | 34 +++++++++++++++ .../include/bsoncxx/v1/array/element.hpp | 43 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/array/element.cpp | 15 +++++++ 5 files changed, 103 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/array/element-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/array/element.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/array/element.cpp diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index 566cd66653..e6fa95cfd1 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -28,6 +28,11 @@ /// Provides headers declaring entities in @ref bsoncxx::v1. /// +/// +/// @dir bsoncxx/v1/array +/// Provides headers declaring entities in @ref bsoncxx::v1::array. +/// + /// /// @dir bsoncxx/v1/config /// Provides headers related to bsoncxx library configuration. @@ -50,6 +55,11 @@ /// Declares entities whose ABI stability is guaranteed for documented symbols. /// +/// +/// @namespace bsoncxx::v1::array +/// @copydoc bsoncxx::array +/// + /// /// @namespace bsoncxx::v1::stdx /// @copydoc bsoncxx::stdx diff --git a/src/bsoncxx/include/bsoncxx/v1/array/element-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/array/element-fwd.hpp new file mode 100644 index 0000000000..37dd90e1c0 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/array/element-fwd.hpp @@ -0,0 +1,34 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace array { + +class element; + +} // namespace array +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::array::element. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/array/element.hpp b/src/bsoncxx/include/bsoncxx/v1/array/element.hpp new file mode 100644 index 0000000000..53dbee41b2 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/array/element.hpp @@ -0,0 +1,43 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace array { + +/// +/// An element within a BSON array. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class element {}; + +} // namespace array +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::array::element. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 02a5c2f8c2..fbf3f98f3e 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -40,6 +40,7 @@ set(bsoncxx_sources_v_noabi ) set(bsoncxx_sources_v1 + bsoncxx/v1/array/element.cpp bsoncxx/v1/config/config.cpp bsoncxx/v1/config/export.cpp bsoncxx/v1/config/version.cpp diff --git a/src/bsoncxx/lib/bsoncxx/v1/array/element.cpp b/src/bsoncxx/lib/bsoncxx/v1/array/element.cpp new file mode 100644 index 0000000000..acfad6eb0d --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/array/element.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From 8442252785956b0b52f0be2488ab4f8998634786 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:43 -0600 Subject: [PATCH 02/18] v1: array/value (fwd) --- .../include/bsoncxx/v1/array/value-fwd.hpp | 34 +++++++++++++++ .../include/bsoncxx/v1/array/value.hpp | 43 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/array/value.cpp | 15 +++++++ 4 files changed, 93 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/array/value-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/array/value.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/array/value.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/array/value-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/array/value-fwd.hpp new file mode 100644 index 0000000000..97f019e22c --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/array/value-fwd.hpp @@ -0,0 +1,34 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace array { + +class value; + +} // namespace array +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::array::value. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/array/value.hpp b/src/bsoncxx/include/bsoncxx/v1/array/value.hpp new file mode 100644 index 0000000000..71e0545e2d --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/array/value.hpp @@ -0,0 +1,43 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace array { + +/// +/// A BSON array. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class value {}; + +} // namespace array +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::array::value. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index fbf3f98f3e..7ae2d6e457 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -41,6 +41,7 @@ set(bsoncxx_sources_v_noabi set(bsoncxx_sources_v1 bsoncxx/v1/array/element.cpp + bsoncxx/v1/array/value.cpp bsoncxx/v1/config/config.cpp bsoncxx/v1/config/export.cpp bsoncxx/v1/config/version.cpp diff --git a/src/bsoncxx/lib/bsoncxx/v1/array/value.cpp b/src/bsoncxx/lib/bsoncxx/v1/array/value.cpp new file mode 100644 index 0000000000..d7e80e8ede --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/array/value.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From 7bf661bf17d2d64dd0abe3e745711267fe1626be Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:44 -0600 Subject: [PATCH 03/18] v1: array/view (fwd) --- .../include/bsoncxx/v1/array/view-fwd.hpp | 34 +++++++++++++++ src/bsoncxx/include/bsoncxx/v1/array/view.hpp | 43 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/array/view.cpp | 15 +++++++ 4 files changed, 93 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/array/view-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/array/view.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/array/view.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/array/view-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/array/view-fwd.hpp new file mode 100644 index 0000000000..56d1551869 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/array/view-fwd.hpp @@ -0,0 +1,34 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace array { + +class view; + +} // namespace array +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::array::view. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/array/view.hpp b/src/bsoncxx/include/bsoncxx/v1/array/view.hpp new file mode 100644 index 0000000000..202c4b956a --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/array/view.hpp @@ -0,0 +1,43 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace array { + +/// +/// A non-owning, read-only BSON array. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class view {}; + +} // namespace array +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::array::view. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 7ae2d6e457..9a4604f70a 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -42,6 +42,7 @@ set(bsoncxx_sources_v_noabi set(bsoncxx_sources_v1 bsoncxx/v1/array/element.cpp bsoncxx/v1/array/value.cpp + bsoncxx/v1/array/view.cpp bsoncxx/v1/config/config.cpp bsoncxx/v1/config/export.cpp bsoncxx/v1/config/version.cpp diff --git a/src/bsoncxx/lib/bsoncxx/v1/array/view.cpp b/src/bsoncxx/lib/bsoncxx/v1/array/view.cpp new file mode 100644 index 0000000000..8eafdc8eb8 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/array/view.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From f3caee44e6b5ede1d356d5ac145acbe7b5009f8c Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:44 -0600 Subject: [PATCH 04/18] v1: document/element (fwd) --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 10 +++++ .../bsoncxx/v1/document/element-fwd.hpp | 34 +++++++++++++++ .../include/bsoncxx/v1/document/element.hpp | 43 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + .../lib/bsoncxx/v1/document/element.cpp | 15 +++++++ 5 files changed, 103 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/document/element-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/document/element.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/document/element.cpp diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index e6fa95cfd1..4e7ae1b330 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -33,6 +33,11 @@ /// Provides headers declaring entities in @ref bsoncxx::v1::array. /// +/// +/// @dir bsoncxx/v1/document +/// Provides headers declaring entities in @ref bsoncxx::v1::document. +/// + /// /// @dir bsoncxx/v1/config /// Provides headers related to bsoncxx library configuration. @@ -60,6 +65,11 @@ /// @copydoc bsoncxx::array /// +/// +/// @namespace bsoncxx::v1::document +/// @copydoc bsoncxx::document +/// + /// /// @namespace bsoncxx::v1::stdx /// @copydoc bsoncxx::stdx diff --git a/src/bsoncxx/include/bsoncxx/v1/document/element-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/document/element-fwd.hpp new file mode 100644 index 0000000000..03e6098609 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/document/element-fwd.hpp @@ -0,0 +1,34 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace document { + +class element; + +} // namespace document +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::document::element. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/document/element.hpp b/src/bsoncxx/include/bsoncxx/v1/document/element.hpp new file mode 100644 index 0000000000..915138858d --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/document/element.hpp @@ -0,0 +1,43 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace document { + +/// +/// An element within a BSON document. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class element {}; + +} // namespace document +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::document::element. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 9a4604f70a..598d5ec421 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -48,6 +48,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/config/version.cpp bsoncxx/v1/detail/postlude.cpp bsoncxx/v1/detail/prelude.cpp + bsoncxx/v1/document/element.cpp ) list(APPEND bsoncxx_sources diff --git a/src/bsoncxx/lib/bsoncxx/v1/document/element.cpp b/src/bsoncxx/lib/bsoncxx/v1/document/element.cpp new file mode 100644 index 0000000000..2a638a5728 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/document/element.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From 3bf4d66cf56e32a2d229d985da56190adc278d43 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:44 -0600 Subject: [PATCH 05/18] v1: document/value (fwd) --- .../include/bsoncxx/v1/document/value-fwd.hpp | 34 +++++++++++++++ .../include/bsoncxx/v1/document/value.hpp | 43 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/document/value.cpp | 15 +++++++ 4 files changed, 93 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/document/value-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/document/value.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/document/value.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/document/value-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/document/value-fwd.hpp new file mode 100644 index 0000000000..e47512ca50 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/document/value-fwd.hpp @@ -0,0 +1,34 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace document { + +class value; + +} // namespace document +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::document::value. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/document/value.hpp b/src/bsoncxx/include/bsoncxx/v1/document/value.hpp new file mode 100644 index 0000000000..06ca4d5c9b --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/document/value.hpp @@ -0,0 +1,43 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace document { + +/// +/// A BSON document. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class value {}; + +} // namespace document +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::document::value. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 598d5ec421..4e126d4ab6 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -49,6 +49,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/detail/postlude.cpp bsoncxx/v1/detail/prelude.cpp bsoncxx/v1/document/element.cpp + bsoncxx/v1/document/value.cpp ) list(APPEND bsoncxx_sources diff --git a/src/bsoncxx/lib/bsoncxx/v1/document/value.cpp b/src/bsoncxx/lib/bsoncxx/v1/document/value.cpp new file mode 100644 index 0000000000..04d1e03673 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/document/value.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From 0d4b7ef618ef297d8389dc9f0d7f125f5504eb60 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:42 -0600 Subject: [PATCH 06/18] v1: document/view (fwd) --- .../include/bsoncxx/v1/document/view-fwd.hpp | 34 +++++++++++++++ .../include/bsoncxx/v1/document/view.hpp | 43 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/document/view.cpp | 15 +++++++ 4 files changed, 93 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/document/view-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/document/view.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/document/view.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/document/view-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/document/view-fwd.hpp new file mode 100644 index 0000000000..b5cdcea445 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/document/view-fwd.hpp @@ -0,0 +1,34 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace document { + +class view; + +} // namespace document +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::document::view. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/document/view.hpp b/src/bsoncxx/include/bsoncxx/v1/document/view.hpp new file mode 100644 index 0000000000..204d834719 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/document/view.hpp @@ -0,0 +1,43 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace document { + +/// +/// A non-owning, read-only BSON document. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class view {}; + +} // namespace document +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::document::view. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 4e126d4ab6..f41ce526b4 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -50,6 +50,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/detail/prelude.cpp bsoncxx/v1/document/element.cpp bsoncxx/v1/document/value.cpp + bsoncxx/v1/document/view.cpp ) list(APPEND bsoncxx_sources diff --git a/src/bsoncxx/lib/bsoncxx/v1/document/view.cpp b/src/bsoncxx/lib/bsoncxx/v1/document/view.cpp new file mode 100644 index 0000000000..949f6a95eb --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/document/view.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From bc5ab49c7f5ecc29c8c71cae34fe4270f0db3e33 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:42 -0600 Subject: [PATCH 07/18] v1: types/element (fwd) --- .../include/bsoncxx/v1/types/element-fwd.hpp | 40 ++++ .../include/bsoncxx/v1/types/element.hpp | 183 ++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/types/element.cpp | 15 ++ 4 files changed, 239 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/types/element-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/types/element.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/types/element.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/types/element-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/types/element-fwd.hpp new file mode 100644 index 0000000000..7ce8be7ba2 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/element-fwd.hpp @@ -0,0 +1,40 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +#include + +namespace bsoncxx { +namespace v1 { +namespace types { + +#pragma push_macro("X") +#undef X +#define X(_name, _value) struct b_##_name; +BSONCXX_V1_TYPES_XMACRO(X) +#pragma pop_macro("X") + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares entities representing BSON types. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/types/element.hpp b/src/bsoncxx/include/bsoncxx/v1/types/element.hpp new file mode 100644 index 0000000000..9c876ee4d1 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/element.hpp @@ -0,0 +1,183 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace types { + +/// +/// A BSON type "64-bit Binary Floating Point". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_double {}; + +/// +/// A BSON type "UTF-8 String". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_string {}; + +/// +/// A BSON type "Embedded Document". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_document {}; + +/// +/// A BSON type "Array". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_array {}; + +/// +/// A BSON type "Binary Data". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_binary {}; + +/// +/// A BSON type "Undefined (Value)". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_undefined {}; + +/// +/// A BSON type "ObjectID". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_oid {}; + +/// +/// A BSON type "Boolean". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_bool {}; + +/// +/// A BSON type "UTC Datetime". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_date {}; + +/// +/// A BSON type "Null Value". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_null {}; + +/// +/// A BSON type "Regular Expression". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_regex {}; + +/// +/// A BSON type "DBPointer". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_dbpointer {}; + +/// +/// A BSON type "JavaScript Code". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_code {}; + +/// +/// A BSON type "Symbol". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_symbol {}; + +/// +/// A BSON type "JavaScript Code With Scope". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_codewscope {}; + +/// +/// A BSON type "32-bit Integer". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_int32 {}; + +/// +/// A BSON type "Timestamp". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_timestamp {}; + +/// +/// A BSON type "64-bit Integer". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_int64 {}; + +/// +/// A BSON type "Decimal128". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_decimal128 {}; + +/// +/// A BSON type "Max Key". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_maxkey {}; + +/// +/// A BSON type "Min Key". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_minkey {}; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides entities representing BSON types. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index f41ce526b4..5155b52913 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -51,6 +51,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/document/element.cpp bsoncxx/v1/document/value.cpp bsoncxx/v1/document/view.cpp + bsoncxx/v1/types/element.cpp ) list(APPEND bsoncxx_sources diff --git a/src/bsoncxx/lib/bsoncxx/v1/types/element.cpp b/src/bsoncxx/lib/bsoncxx/v1/types/element.cpp new file mode 100644 index 0000000000..cd9a6b8430 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/types/element.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From 583cd4b38fceca87b5e0d2065a7bc8076c625b84 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:43 -0600 Subject: [PATCH 08/18] v1: types/value (fwd) --- .../include/bsoncxx/v1/types/value-fwd.hpp | 34 +++++++++++++++ .../include/bsoncxx/v1/types/value.hpp | 43 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/types/value.cpp | 15 +++++++ 4 files changed, 93 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/types/value-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/types/value.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/types/value.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/types/value-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/types/value-fwd.hpp new file mode 100644 index 0000000000..280ec854e1 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/value-fwd.hpp @@ -0,0 +1,34 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace types { + +class value; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::types::value. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/types/value.hpp b/src/bsoncxx/include/bsoncxx/v1/types/value.hpp new file mode 100644 index 0000000000..d3123c61b5 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/value.hpp @@ -0,0 +1,43 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace types { + +/// +/// A union of BSON types. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class value {}; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::types::value. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 5155b52913..20f6c33ec0 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -52,6 +52,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/document/value.cpp bsoncxx/v1/document/view.cpp bsoncxx/v1/types/element.cpp + bsoncxx/v1/types/value.cpp ) list(APPEND bsoncxx_sources diff --git a/src/bsoncxx/lib/bsoncxx/v1/types/value.cpp b/src/bsoncxx/lib/bsoncxx/v1/types/value.cpp new file mode 100644 index 0000000000..2a04af19a0 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/types/value.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From b0a9802fd6fedc506441b98bf4b65838eacddc9e Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:43 -0600 Subject: [PATCH 09/18] v1: types/view (fwd) --- .../include/bsoncxx/v1/types/view-fwd.hpp | 34 +++++++++++++++ src/bsoncxx/include/bsoncxx/v1/types/view.hpp | 43 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/types/view.cpp | 15 +++++++ 4 files changed, 93 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/types/view-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/types/view.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/types/view.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/types/view-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/types/view-fwd.hpp new file mode 100644 index 0000000000..f265370a8e --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/view-fwd.hpp @@ -0,0 +1,34 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace types { + +class view; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::types::view. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/types/view.hpp b/src/bsoncxx/include/bsoncxx/v1/types/view.hpp new file mode 100644 index 0000000000..3b56fe046e --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/view.hpp @@ -0,0 +1,43 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { +namespace types { + +/// +/// A non-owning, read-only union of BSON types. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class view {}; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::types::view. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 20f6c33ec0..537d2d26e6 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -53,6 +53,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/document/view.cpp bsoncxx/v1/types/element.cpp bsoncxx/v1/types/value.cpp + bsoncxx/v1/types/view.cpp ) list(APPEND bsoncxx_sources diff --git a/src/bsoncxx/lib/bsoncxx/v1/types/view.cpp b/src/bsoncxx/lib/bsoncxx/v1/types/view.cpp new file mode 100644 index 0000000000..c57193c1c5 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/types/view.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From 149618371b46bb4ae83d0bef1433dc4c93ea26bc Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:43 -0600 Subject: [PATCH 10/18] v1: types (fwd) --- src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp | 110 +++++++++++++++++++ src/bsoncxx/include/bsoncxx/v1/types.hpp | 48 ++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/types.cpp | 15 +++ 4 files changed, 174 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/types.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/types.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp new file mode 100644 index 0000000000..afd5737858 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp @@ -0,0 +1,110 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +#include + +/// +/// X-macro over the name and value of BSON types. +/// +/// @par "Example" +/// ```cpp +/// #define EXAMPLE(name, value) std::cout << (#name) << ": " << (value) << '\n'; +/// +/// void print_bson_types() { +/// // Expands to: +/// // std::cout << ("double") << ": " << (0x01) << '\n'; +/// // std::cout << ("string") << ": " << (0x02) << '\n'; +/// // ... +/// BSONCXX_V1_TYPES_XMACRO(EXAMPLE) +/// } +/// ``` +/// +/// @param X the user-defined macro to be expanded. +/// +// clang-format off +#define BSONCXX_V1_TYPES_XMACRO(X) \ + X(double, 0x01) \ + X(string, 0x02) \ + X(document, 0x03) \ + X(array, 0x04) \ + X(binary, 0x05) \ + X(undefined, 0x06) \ + X(oid, 0x07) \ + X(bool, 0x08) \ + X(date, 0x09) \ + X(null, 0x0A) \ + X(regex, 0x0B) \ + X(dbpointer, 0x0C) \ + X(code, 0x0D) \ + X(symbol, 0x0E) \ + X(codewscope, 0x0F) \ + X(int32, 0x10) \ + X(timestamp, 0x11) \ + X(int64, 0x12) \ + X(decimal128, 0x13) \ + X(maxkey, 0x7F) \ + X(minkey, 0xFF) +// clang-format on + +/// +/// X-macro over the name and value of BSON binary subtypes. +/// +/// @par "Example" +/// ```cpp +/// #define EXAMPLE(name, value) std::cout << #name << ": " << value << '\n'; +/// +/// void print_bson_binary_subtypes() { +/// // Expands to: +/// // std::cout << ("binary") << ": " << (0x00) << '\n'; +/// // std::cout << ("function") << ": " << (0x01) << '\n'; +/// // ... +/// BSONCXX_V1_BINARY_SUBTYPES_XMACRO(EXAMPLE) +/// } +/// ``` +/// +/// @param X the user-defined macro to be expanded. +/// +// clang-format off +#define BSONCXX_V1_BINARY_SUBTYPES_XMACRO(X) \ + X(binary, 0x00) \ + X(function, 0x01) \ + X(binary_deprecated, 0x02) \ + X(uuid_deprecated, 0x03) \ + X(uuid, 0x04) \ + X(md5, 0x05) \ + X(encrypted, 0x06) \ + X(column, 0x07) \ + X(sensitive, 0x08) \ + X(user, 0x80) +// clang-format on + +namespace bsoncxx { +namespace v1 { + +enum class type : std::uint8_t; +enum class binary_subtype : std::uint8_t; + +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares entities describing BSON types. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/types.hpp b/src/bsoncxx/include/bsoncxx/v1/types.hpp new file mode 100644 index 0000000000..d2a5c1493f --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types.hpp @@ -0,0 +1,48 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { + +/// +/// Enumeration identifying all BSON types. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +enum class type : std::uint8_t {}; + +/// +/// Enumeration identifying all BSON binary subtypes. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +enum class binary_subtype : std::uint8_t {}; + +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides entities representing BSON types. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 537d2d26e6..efdb7ac8a4 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -51,6 +51,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/document/element.cpp bsoncxx/v1/document/value.cpp bsoncxx/v1/document/view.cpp + bsoncxx/v1/types.cpp bsoncxx/v1/types/element.cpp bsoncxx/v1/types/value.cpp bsoncxx/v1/types/view.cpp diff --git a/src/bsoncxx/lib/bsoncxx/v1/types.cpp b/src/bsoncxx/lib/bsoncxx/v1/types.cpp new file mode 100644 index 0000000000..2906353475 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/types.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From a064bd9259192ef9251d2294632a0284b73df832 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:44 -0600 Subject: [PATCH 11/18] v1: decimal128 (fwd) --- .../include/bsoncxx/v1/decimal128-fwd.hpp | 32 +++++++++++++++ src/bsoncxx/include/bsoncxx/v1/decimal128.hpp | 41 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/decimal128.cpp | 15 +++++++ 4 files changed, 89 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/decimal128-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/decimal128.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/decimal128.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/decimal128-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/decimal128-fwd.hpp new file mode 100644 index 0000000000..24d8759356 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/decimal128-fwd.hpp @@ -0,0 +1,32 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { + +class decimal128; + +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::decimal128. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/decimal128.hpp b/src/bsoncxx/include/bsoncxx/v1/decimal128.hpp new file mode 100644 index 0000000000..4f9c12612b --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/decimal128.hpp @@ -0,0 +1,41 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { + +/// +/// A BSON Decimal128. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class decimal128 {}; + +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::decimal128. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index efdb7ac8a4..474170a3a7 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -46,6 +46,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/config/config.cpp bsoncxx/v1/config/export.cpp bsoncxx/v1/config/version.cpp + bsoncxx/v1/decimal128.cpp bsoncxx/v1/detail/postlude.cpp bsoncxx/v1/detail/prelude.cpp bsoncxx/v1/document/element.cpp diff --git a/src/bsoncxx/lib/bsoncxx/v1/decimal128.cpp b/src/bsoncxx/lib/bsoncxx/v1/decimal128.cpp new file mode 100644 index 0000000000..e2c2d465b4 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/decimal128.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From b1726eef3bade94aae2ff8180eb4572fd1000abd Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:44 -0600 Subject: [PATCH 12/18] v1: exception (fwd) --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 5 ++ .../include/bsoncxx/v1/exception-fwd.hpp | 44 +++++++++++++ src/bsoncxx/include/bsoncxx/v1/exception.hpp | 65 +++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/exception.cpp | 15 +++++ 5 files changed, 130 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/exception-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/exception.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/exception.cpp diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index 4e7ae1b330..d40e333b7b 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -70,6 +70,11 @@ /// @copydoc bsoncxx::document /// +/// +/// @namespace bsoncxx::v1::error +/// Declares entities describing @ref bsoncxx::v1 errors. +/// + /// /// @namespace bsoncxx::v1::stdx /// @copydoc bsoncxx::stdx diff --git a/src/bsoncxx/include/bsoncxx/v1/exception-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/exception-fwd.hpp new file mode 100644 index 0000000000..44c105e0a4 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/exception-fwd.hpp @@ -0,0 +1,44 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { +namespace error { + +enum class source; + +enum class type; + +} // namespace error +} // namespace v1 +} // namespace bsoncxx + +namespace bsoncxx { +namespace v1 { + +class exception; + +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares bsoncxx error-handling utilities. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/exception.hpp b/src/bsoncxx/include/bsoncxx/v1/exception.hpp new file mode 100644 index 0000000000..ad2fbd0a51 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/exception.hpp @@ -0,0 +1,65 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +#include + +namespace bsoncxx { +namespace v1 { +namespace error { + +/// +/// Enumeration identifying the source of a @ref bsoncxx::v1 error. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +enum class source {}; + +/// +/// Enumeration identifying the type (cause) of a @ref bsoncxx::v1 error. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +enum class type {}; + +} // namespace error +} // namespace v1 +} // namespace bsoncxx + +namespace bsoncxx { +namespace v1 { + +/// +/// Base class for all exceptions thrown by @ref bsoncxx::v1. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class exception {}; + +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides bsoncxx error-handling utilities. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 474170a3a7..50c1999a70 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -52,6 +52,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/document/element.cpp bsoncxx/v1/document/value.cpp bsoncxx/v1/document/view.cpp + bsoncxx/v1/exception.cpp bsoncxx/v1/types.cpp bsoncxx/v1/types/element.cpp bsoncxx/v1/types/value.cpp diff --git a/src/bsoncxx/lib/bsoncxx/v1/exception.cpp b/src/bsoncxx/lib/bsoncxx/v1/exception.cpp new file mode 100644 index 0000000000..50b176a8a8 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/exception.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From 4e234da813803a428e896664a5ee03aeaecc0a2e Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:44 -0600 Subject: [PATCH 13/18] v1: oid (fwd) --- src/bsoncxx/include/bsoncxx/v1/oid-fwd.hpp | 32 +++++++++++++++++ src/bsoncxx/include/bsoncxx/v1/oid.hpp | 41 ++++++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 1 + src/bsoncxx/lib/bsoncxx/v1/oid.cpp | 15 ++++++++ 4 files changed, 89 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/oid-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/oid.hpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/oid.cpp diff --git a/src/bsoncxx/include/bsoncxx/v1/oid-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/oid-fwd.hpp new file mode 100644 index 0000000000..ad0b88e08d --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/oid-fwd.hpp @@ -0,0 +1,32 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +namespace bsoncxx { +namespace v1 { + +class oid; + +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::oid. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/oid.hpp b/src/bsoncxx/include/bsoncxx/v1/oid.hpp new file mode 100644 index 0000000000..02c24211de --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/oid.hpp @@ -0,0 +1,41 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +// + +#include + +namespace bsoncxx { +namespace v1 { + +/// +/// A BSON ObjectID. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class oid {}; + +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::oid. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 50c1999a70..b9d252d24b 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -53,6 +53,7 @@ set(bsoncxx_sources_v1 bsoncxx/v1/document/value.cpp bsoncxx/v1/document/view.cpp bsoncxx/v1/exception.cpp + bsoncxx/v1/oid.cpp bsoncxx/v1/types.cpp bsoncxx/v1/types/element.cpp bsoncxx/v1/types/value.cpp diff --git a/src/bsoncxx/lib/bsoncxx/v1/oid.cpp b/src/bsoncxx/lib/bsoncxx/v1/oid.cpp new file mode 100644 index 0000000000..cfa9b0e6af --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/oid.cpp @@ -0,0 +1,15 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include From 7c0fa4ca77be99715e899896c23113c2678a4a0c Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:45 -0600 Subject: [PATCH 14/18] docs: "BSON type" <- "BSON value type" --- src/bsoncxx/include/bsoncxx/docs/top.hpp | 4 ++-- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 10 ++++++++++ src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/bsoncxx/include/bsoncxx/docs/top.hpp b/src/bsoncxx/include/bsoncxx/docs/top.hpp index 3d4530d9fe..3ca487943b 100644 --- a/src/bsoncxx/include/bsoncxx/docs/top.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/top.hpp @@ -81,10 +81,10 @@ /// /// @namespace bsoncxx::types -/// Declares entities representing BSON value types. +/// Declares entities representing a BSON type. /// /// /// @namespace bsoncxx::types::bson_value -/// Declares entities representing any BSON value type. +/// Declares entities representing a BSON type. /// diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index d40e333b7b..7244bd3ec6 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -55,6 +55,11 @@ /// Provides headers declaring entities in @ref bsoncxx::v1::stdx. /// +/// +/// @dir bsoncxx/v1/types +/// Provides headers declaring entities in @ref bsoncxx::v1::types. +/// + /// /// @namespace bsoncxx::v1 /// Declares entities whose ABI stability is guaranteed for documented symbols. @@ -79,3 +84,8 @@ /// @namespace bsoncxx::v1::stdx /// @copydoc bsoncxx::stdx /// + +/// +/// @namespace bsoncxx::v1::types +/// @copydoc bsoncxx::types +/// diff --git a/src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp b/src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp index a9275ae284..28ad747b6e 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v_noabi.hpp @@ -138,7 +138,7 @@ /// /// @namespace bsoncxx::v_noabi::types -/// @copydoc bsoncxx::types +/// Declares entities representing BSON value types. /// /// @see /// - @ref bsoncxx::v_noabi::types::bson_value From 97c0756cc5bcb7315c8630c671547d2b8d896835 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Feb 2025 15:55:45 -0600 Subject: [PATCH 15/18] v1: fwd --- src/bsoncxx/include/bsoncxx/v1/fwd.hpp | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/bsoncxx/include/bsoncxx/v1/fwd.hpp diff --git a/src/bsoncxx/include/bsoncxx/v1/fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/fwd.hpp new file mode 100644 index 0000000000..d2c9155c2c --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/fwd.hpp @@ -0,0 +1,41 @@ +// Copyright 2009-present MongoDB, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/// +/// @file +/// Aggregate of all forward headers declaring entities in @ref bsoncxx::v1. +/// +/// @par Includes +/// - All header files under `bsoncxx/v1` whose filename ends with `-fwd.hpp`. +/// From ff821fbfc67c503166206065d8aff45e9e291a25 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 6 Mar 2025 12:01:33 -0600 Subject: [PATCH 16/18] Fix placement of bsoncxx/v1/document doc comment --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index 7244bd3ec6..a1d6877f97 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -33,11 +33,6 @@ /// Provides headers declaring entities in @ref bsoncxx::v1::array. /// -/// -/// @dir bsoncxx/v1/document -/// Provides headers declaring entities in @ref bsoncxx::v1::document. -/// - /// /// @dir bsoncxx/v1/config /// Provides headers related to bsoncxx library configuration. @@ -50,6 +45,11 @@ /// @warning For internal use only! /// +/// +/// @dir bsoncxx/v1/document +/// Provides headers declaring entities in @ref bsoncxx::v1::document. +/// + /// /// @dir bsoncxx/v1/stdx /// Provides headers declaring entities in @ref bsoncxx::v1::stdx. From 880b2e4f27e0e444aff04adf1e932adc02bdc3c5 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 6 Mar 2025 12:01:33 -0600 Subject: [PATCH 17/18] Document API compatibility guidelines for X-macros --- src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp index afd5737858..15ff2c415a 100644 --- a/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp @@ -21,6 +21,10 @@ /// /// X-macro over the name and value of BSON types. /// +/// @important The addition of new expansions to this X-macro ARE NOT considered an API breaking change. +/// The modification or removal of existing expansions to this X-macro ARE considered an API breaking change. +/// This X-macro MUST used in a manner that is compatible with these API compatibility guidelines! +/// /// @par "Example" /// ```cpp /// #define EXAMPLE(name, value) std::cout << (#name) << ": " << (value) << '\n'; @@ -64,6 +68,10 @@ /// /// X-macro over the name and value of BSON binary subtypes. /// +/// @important The addition of new expansions to this X-macro ARE NOT considered an API breaking change. +/// The modification or removal of existing expansions to this X-macro ARE considered an API breaking change. +/// This X-macro MUST used in a manner that is compatible with these API compatibility guidelines! +/// /// @par "Example" /// ```cpp /// #define EXAMPLE(name, value) std::cout << #name << ": " << value << '\n'; From 92767b704cc6add943aebb44d06cccc7f20f9d5f Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 13 Mar 2025 10:47:02 -0500 Subject: [PATCH 18/18] Fix grammar --- src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp index 15ff2c415a..660c2b9025 100644 --- a/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp +++ b/src/bsoncxx/include/bsoncxx/v1/types-fwd.hpp @@ -23,7 +23,7 @@ /// /// @important The addition of new expansions to this X-macro ARE NOT considered an API breaking change. /// The modification or removal of existing expansions to this X-macro ARE considered an API breaking change. -/// This X-macro MUST used in a manner that is compatible with these API compatibility guidelines! +/// This X-macro MUST be used in a manner that is compatible with these API compatibility guidelines! /// /// @par "Example" /// ```cpp @@ -70,7 +70,7 @@ /// /// @important The addition of new expansions to this X-macro ARE NOT considered an API breaking change. /// The modification or removal of existing expansions to this X-macro ARE considered an API breaking change. -/// This X-macro MUST used in a manner that is compatible with these API compatibility guidelines! +/// This X-macro MUST be used in a manner that is compatible with these API compatibility guidelines! /// /// @par "Example" /// ```cpp