MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
topology_opening_event.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <mongocxx/events/topology_opening_event-fwd.hpp> // IWYU pragma: export
18
19//
20
21#include <mongocxx/v1/events/topology_opening.hpp> // IWYU pragma: export
22
23#include <bsoncxx/oid.hpp>
24
25#include <mongocxx/events/topology_description.hpp> // IWYU pragma: keep: backward compatibility, to be removed.
26
28
29namespace mongocxx {
30namespace v_noabi {
31namespace events {
32
40 private:
42
43 public:
48
52 /* explicit(false) */ topology_opening_event(v1::events::topology_opening const& event) : _event{event} {}
53
57 explicit operator v1::events::topology_opening() const {
58 return _event;
59 }
60
68 return _event.topology_id();
69 }
70};
71
72} // namespace events
73} // namespace v_noabi
74} // namespace mongocxx
75
76namespace mongocxx {
77namespace v_noabi {
78
85
92
93} // namespace v_noabi
94} // namespace mongocxx
95
97
Represents a MongoDB BSON ObjectId.
Definition oid.hpp:41
TopologyOpeningEvent from the SDAM Logging and Monitoring specification.
Definition topology_opening.hpp:39
A new connection to a topology of MongoDB servers.
Definition topology_opening_event.hpp:39
bsoncxx::v_noabi::oid topology_id() const
An opaque id, unique to this topology for this mongocxx::v_noabi::client or mongocxx::v_noabi::pool.
Definition topology_opening_event.hpp:67
topology_opening_event(v1::events::topology_opening const &event)
Construct with the mongocxx::v1 equivalent.
Definition topology_opening_event.hpp:52
#define MONGOCXX_ABI_NO_EXPORT
Excludes the associated entity from being part of the ABI.
Definition export.hpp:20
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
Declares entities describing APM events.
Declares entities whose ABI stability is NOT guaranteed.
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Provides mongocxx::v1::events::topology_opening.
Declares mongocxx::v_noabi::events::topology_opening_event.
Provides bsoncxx::v_noabi::oid.
Provides mongocxx::v_noabi::events::topology_description.