From bf4522172ea18ea8ec739a4c938aa8eb6d7661ca Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 6 May 2025 10:44:07 -0500 Subject: [PATCH 1/2] CXX-3231 add v1 forward headers and component files --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 50 +++++ .../include/bsoncxx/v1/array/value-fwd.hpp | 34 +++ .../include/bsoncxx/v1/array/value.hpp | 43 ++++ .../include/bsoncxx/v1/array/view-fwd.hpp | 34 +++ src/bsoncxx/include/bsoncxx/v1/array/view.hpp | 43 ++++ .../include/bsoncxx/v1/decimal128-fwd.hpp | 32 +++ src/bsoncxx/include/bsoncxx/v1/decimal128.hpp | 41 ++++ .../include/bsoncxx/v1/document/value-fwd.hpp | 34 +++ .../include/bsoncxx/v1/document/value.hpp | 43 ++++ .../include/bsoncxx/v1/document/view-fwd.hpp | 34 +++ .../include/bsoncxx/v1/document/view.hpp | 43 ++++ .../include/bsoncxx/v1/element/view-fwd.hpp | 34 +++ .../include/bsoncxx/v1/element/view.hpp | 43 ++++ .../include/bsoncxx/v1/exception-fwd.hpp | 44 ++++ src/bsoncxx/include/bsoncxx/v1/exception.hpp | 65 ++++++ src/bsoncxx/include/bsoncxx/v1/oid-fwd.hpp | 32 +++ src/bsoncxx/include/bsoncxx/v1/oid.hpp | 41 ++++ .../include/bsoncxx/v1/types/id-fwd.hpp | 121 +++++++++++ src/bsoncxx/include/bsoncxx/v1/types/id.hpp | 54 +++++ .../include/bsoncxx/v1/types/value-fwd.hpp | 36 ++++ .../include/bsoncxx/v1/types/value.hpp | 46 +++++ .../include/bsoncxx/v1/types/view-fwd.hpp | 44 ++++ src/bsoncxx/include/bsoncxx/v1/types/view.hpp | 195 ++++++++++++++++++ src/bsoncxx/lib/CMakeLists.txt | 11 + src/bsoncxx/lib/bsoncxx/v1/array/value.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/array/view.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/decimal128.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/document/value.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/document/view.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/element/view.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/exception.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/oid.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/types/id.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/types/value.cpp | 15 ++ src/bsoncxx/lib/bsoncxx/v1/types/view.cpp | 15 ++ 35 files changed, 1362 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/include/bsoncxx/v1/array/view-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/array/view.hpp 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/include/bsoncxx/v1/document/value-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/document/value.hpp 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/include/bsoncxx/v1/element/view-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/element/view.hpp 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/include/bsoncxx/v1/oid-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/oid.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/types/id-fwd.hpp create mode 100644 src/bsoncxx/include/bsoncxx/v1/types/id.hpp 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/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/array/value.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/array/view.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/decimal128.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/document/value.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/document/view.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/element/view.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/exception.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/oid.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/types/id.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/types/value.cpp create mode 100644 src/bsoncxx/lib/bsoncxx/v1/types/view.cpp diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index 566cd66653..57b0573137 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -40,17 +40,67 @@ /// @warning For internal use only! /// +/// +/// @dir bsoncxx/v1/array +/// Provides headers declaring entities in @ref bsoncxx::v1::array. +/// +/// @warning For internal use only! +/// + +/// +/// @dir bsoncxx/v1/document +/// Provides headers declaring entities in @ref bsoncxx::v1::document. +/// +/// @warning For internal use only! +/// + +/// +/// @dir bsoncxx/v1/element +/// Provides headers declaring entities in @ref bsoncxx::v1::element. +/// +/// @warning For internal use only! +/// + /// /// @dir bsoncxx/v1/stdx /// Provides headers declaring entities in @ref bsoncxx::v1::stdx. /// +/// +/// @dir bsoncxx/v1/types +/// Provides headers declaring entities in @ref bsoncxx::v1::types. +/// +/// @warning For internal use only! +/// + /// /// @namespace bsoncxx::v1 /// Declares entities whose ABI stability is guaranteed for documented symbols. /// +/// +/// @namespace bsoncxx::v1::array +/// @copydoc bsoncxx::array +/// + +/// +/// @namespace bsoncxx::v1::document +/// @copydoc bsoncxx::array +/// + +/// +/// @namespace bsoncxx::v1::element +/// Declares entities representing a BSON element. +/// + /// /// @namespace bsoncxx::v1::stdx /// @copydoc bsoncxx::stdx /// + +/// +/// @namespace bsoncxx::v1::types +/// Declares entities representing a BSON type value. +/// +/// @note A "BSON type value" refers to the value of a BSON element without its key. +/// 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/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/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/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/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/include/bsoncxx/v1/element/view-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/element/view-fwd.hpp new file mode 100644 index 0000000000..ce2c35d140 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/element/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 element { + +class view; + +} // namespace element +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares @ref bsoncxx::v1::element::view. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/element/view.hpp b/src/bsoncxx/include/bsoncxx/v1/element/view.hpp new file mode 100644 index 0000000000..84df4c2b05 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/element/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 element { + +/// +/// A non-owning, read-only BSON element. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class view {}; + +} // namespace element +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides @ref bsoncxx::v1::element::view. +/// 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/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/include/bsoncxx/v1/types/id-fwd.hpp b/src/bsoncxx/include/bsoncxx/v1/types/id-fwd.hpp new file mode 100644 index 0000000000..32143780cc --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/id-fwd.hpp @@ -0,0 +1,121 @@ +// 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. +/// +/// @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 be used in a manner that is compatible with these API compatibility guidelines! +/// +/// @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. +/// +/// @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 be used in a manner that is compatible with these API compatibility guidelines! +/// +/// @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(vector, 0x09) \ + X(user, 0x80) +// clang-format on + +namespace bsoncxx { +namespace v1 { +namespace types { + +enum class id : std::uint8_t; +enum class binary_subtype : std::uint8_t; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares enumerations identifying the type of a BSON element. +/// diff --git a/src/bsoncxx/include/bsoncxx/v1/types/id.hpp b/src/bsoncxx/include/bsoncxx/v1/types/id.hpp new file mode 100644 index 0000000000..89a43808e5 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/id.hpp @@ -0,0 +1,54 @@ +// 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 { + +/// +/// Enumeration identifying a BSON type. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +/// @showenumvalues +/// +enum class id : std::uint8_t {}; + +/// +/// Enumeration identifying a BSON binary subtype. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +/// @showenumvalues +/// +enum class binary_subtype : std::uint8_t {}; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides enumerations identifying the type of a BSON element. +/// 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..d7e2019e57 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/value-fwd.hpp @@ -0,0 +1,36 @@ +// 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 { + +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..fe5fe54126 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/value.hpp @@ -0,0 +1,46 @@ +// 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 type values. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +/// @note A "BSON type value" refers to the value of a BSON element without its key. +/// +class value {}; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// +/// @file +/// Provides @ref bsoncxx::v1::types::value. +/// 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..9e2d71280a --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/view-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 + +#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") + +class view; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Declares non-owning, read-only entities representing a BSON type value. +/// +/// @note A "BSON type value" refers to the value of a BSON element without its key. +/// 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..5ceabc143b --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/v1/types/view.hpp @@ -0,0 +1,195 @@ +// 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 { + +/// +/// BSON type value "64-bit Binary Floating Point". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_double {}; + +/// +/// BSON type value "UTF-8 String". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_string {}; + +/// +/// BSON type value "Embedded Document". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_document {}; + +/// +/// BSON type value "Array". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_array {}; + +/// +/// BSON type value "Binary Data". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_binary {}; + +/// +/// BSON type value "Undefined (Value)". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_undefined {}; + +/// +/// BSON type value "ObjectID". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_oid {}; + +/// +/// BSON type value "Boolean". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_bool {}; + +/// +/// BSON type value "UTC Datetime". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_date {}; + +/// +/// BSON type value "Null Value". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_null {}; + +/// +/// BSON type value "Regular Expression". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_regex {}; + +/// +/// BSON type value "DBPointer". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_dbpointer {}; + +/// +/// BSON type value "JavaScript Code". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_code {}; + +/// +/// BSON type value "Symbol". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_symbol {}; + +/// +/// BSON type value "JavaScript Code With Scope". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_codewscope {}; + +/// +/// BSON type value "32-bit Integer". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_int32 {}; + +/// +/// BSON type value "Timestamp". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_timestamp {}; + +/// +/// BSON type value "64-bit Integer". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_int64 {}; + +/// +/// BSON type value "Decimal128". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_decimal128 {}; + +/// +/// BSON type value "Max Key". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_maxkey {}; + +/// +/// BSON type value "Min Key". +/// +/// @attention This feature is experimental! It is not ready for use! +/// +struct b_minkey {}; + +/// +/// A non-owning, read-only union of BSON type values. +/// +/// @note This class only represents the **value** of a BSON element without its key. +/// @ref bsoncxx::v1::element::view represents a BSON element including its key. +/// +/// @attention This feature is experimental! It is not ready for use! +/// +class view {}; + +} // namespace types +} // namespace v1 +} // namespace bsoncxx + +#include + +/// +/// @file +/// Provides non-owning, read-only entities representing a BSON type value. +/// +/// @note A "BSON type value" refers to the value of a BSON element without its key. +/// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 46e277a297..dada934282 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -42,11 +42,22 @@ set(bsoncxx_sources_v_noabi ) set(bsoncxx_sources_v1 + 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 + bsoncxx/v1/decimal128.cpp bsoncxx/v1/detail/postlude.cpp bsoncxx/v1/detail/prelude.cpp + bsoncxx/v1/document/value.cpp + bsoncxx/v1/document/view.cpp + bsoncxx/v1/element/view.cpp + bsoncxx/v1/exception.cpp + bsoncxx/v1/oid.cpp + bsoncxx/v1/types/id.cpp + bsoncxx/v1/types/value.cpp + bsoncxx/v1/types/view.cpp ) list(APPEND bsoncxx_sources 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 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 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 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 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 diff --git a/src/bsoncxx/lib/bsoncxx/v1/element/view.cpp b/src/bsoncxx/lib/bsoncxx/v1/element/view.cpp new file mode 100644 index 0000000000..9f7b1fac53 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/element/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 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 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 diff --git a/src/bsoncxx/lib/bsoncxx/v1/types/id.cpp b/src/bsoncxx/lib/bsoncxx/v1/types/id.cpp new file mode 100644 index 0000000000..0f882b4d78 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v1/types/id.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 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 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 dec8040b01500139148d452f643f1dc3e7b11402 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Tue, 13 May 2025 09:32:19 -0500 Subject: [PATCH 2/2] Fix typo in copydoc --- src/bsoncxx/include/bsoncxx/docs/v1.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bsoncxx/include/bsoncxx/docs/v1.hpp b/src/bsoncxx/include/bsoncxx/docs/v1.hpp index 57b0573137..3daeee8035 100644 --- a/src/bsoncxx/include/bsoncxx/docs/v1.hpp +++ b/src/bsoncxx/include/bsoncxx/docs/v1.hpp @@ -85,7 +85,7 @@ /// /// @namespace bsoncxx::v1::document -/// @copydoc bsoncxx::array +/// @copydoc bsoncxx::document /// ///