#include <mongocxx/v_noabi/mongocxx/instance.hpp>
An instance of the MongoDB C++ Driver.
All mongocxx API MUST be used within the lifetime of the instance object, with special exemptions listed below. Only ONE instance object may exist for the lifetime of a given process. It is undefined behavior to use the mongocxx API before the instance object is initialized or after the instance object is destroyed. It is undefined behavior to create more than one instance object.
Public Member Functions | |
| instance () | |
| Creates an instance of the driver. | |
| instance (instance &&other) noexcept | |
| Move constructs an instance of the driver. | |
| instance (instance const &)=delete | |
| This class is not copyable. | |
| instance (std::unique_ptr< v_noabi::logger > logger) | |
| Creates an instance of the driver with a user provided log handler. | |
| ~instance () | |
| Destroys an instance of the driver. | |
| instance & | operator= (instance &&other) noexcept |
| Move assigns an instance of the driver. | |
| instance & | operator= (instance const &)=delete |
| This class is not copyable. | |
Static Public Member Functions | |
| static instance & | current () |
Creates an instance of the driver.
| mongocxx::v_noabi::instance::instance | ( | std::unique_ptr< v_noabi::logger > | logger | ) |
Creates an instance of the driver with a user provided log handler.
| logger | The logger that the driver will direct log messages to. |
| mongocxx::v_noabi::logic_error | if an instance already exists. |
|
noexcept |
Move constructs an instance of the driver.
|
delete |
This class is not copyable.
Destroys an instance of the driver.
|
static |
Move assigns an instance of the driver.
This class is not copyable.