45 using container = std::vector<server_description>;
105 container _container;
170#include <mongocxx/config/postlude.hpp>
An array of server_description instances.
Definition topology_description.hpp:43
iterator end() noexcept
Returns an iterator to the end.
iterator begin() noexcept
Returns an iterator to the beginning.
container::iterator iterator
The array's iterator type.
Definition topology_description.hpp:69
container::const_iterator const_iterator
The array's const iterator type.
Definition topology_description.hpp:74
std::size_t size() const noexcept
The number of server_description instances in the array.
A description of the topology of one or more connected MongoDB servers.
Definition topology_description.hpp:38
bool has_readable_server(mongocxx::v_noabi::read_preference const &pref) const
Determines if the topology has a readable server available. Servers are filtered by the given read pr...
bool has_writable_server() const
Determines if the topology has a writable server available, such as a primary, mongos,...
bsoncxx::v_noabi::stdx::string_view type() const
The topology type: "Unknown", "Sharded", "ReplicaSetNoPrimary", "ReplicaSetWithPrimary",...
server_descriptions servers() const
Fetches descriptions for all known servers in the topology.
Describes how MongoDB clients route read operations to the members of a replica set or sharded cluste...
Definition read_preference.hpp:49
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
The top-level namespace within which all mongocxx library entities are declared.
Provides mongocxx::v_noabi::read_preference.
Provides mongocxx::v_noabi::events::server_description.
Declares mongocxx::v_noabi::events::topology_description.
Provides std::string_view-related polyfills for library API usage.