MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
mongocxx::v1::pool::entry Class Reference

#include <mongocxx/v1/pool.hpp>

Description

A handle to a client object owned by an associated pool.

Attention
This feature is experimental! It is not ready for use!

Public Member Functions

 entry (entry &&other) noexcept
 Move constructor.
 entry (entry const &other)=delete
 This class is not copyable.
 ~entry ()
 Destroy this object, releasing the managed client object back to the associated pool.
 operator bool () const
 Return true when *this is NOT in an assign-or-destroy-only state.
v1::clientoperator* ()
 Access the managed client.
v1::clientoperator-> ()
 Access the managed client.
entryoperator= (entry &&other) noexcept
 Move assignment.
entryoperator= (entry const &other)=delete
 This class is not copyable.
entryoperator= (std::nullptr_t)
 Explicitly release the managed client object back to the associated pool.
v1::database database (bsoncxx::v1::stdx::string_view name)
 Equivalent to (*this)->database(name).
v1::database operator[] (bsoncxx::v1::stdx::string_view name)
 Equivalent to (*this)->database(name).

Constructor & Destructor Documentation

◆ ~entry()

mongocxx::v1::pool::entry::~entry ( )

Destroy this object, releasing the managed client object back to the associated pool.

◆ entry() [1/2]

mongocxx::v1::pool::entry::entry ( entry && other)
noexcept

Move constructor.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ entry() [2/2]

mongocxx::v1::pool::entry::entry ( entry const & other)
delete

This class is not copyable.

Member Function Documentation

◆ database()

v1::database mongocxx::v1::pool::entry::database ( bsoncxx::v1::stdx::string_view name)

Equivalent to (*this)->database(name).

◆ operator bool()

mongocxx::v1::pool::entry::operator bool ( ) const
explicit

Return true when *this is NOT in an assign-or-destroy-only state.

◆ operator*()

v1::client & mongocxx::v1::pool::entry::operator* ( )

Access the managed client.

◆ operator->()

v1::client * mongocxx::v1::pool::entry::operator-> ( )

Access the managed client.

◆ operator=() [1/3]

entry & mongocxx::v1::pool::entry::operator= ( entry && other)
noexcept

Move assignment.

Postconditions:
  • other is in an assign-or-destroy-only state.

◆ operator=() [2/3]

entry & mongocxx::v1::pool::entry::operator= ( entry const & other)
delete

This class is not copyable.

◆ operator=() [3/3]

entry & mongocxx::v1::pool::entry::operator= ( std::nullptr_t )

Explicitly release the managed client object back to the associated pool.

Postconditions:
  • *this is in an assign-or-destroy-only state.

◆ operator[]()

v1::database mongocxx::v1::pool::entry::operator[] ( bsoncxx::v1::stdx::string_view name)

Equivalent to (*this)->database(name).


The documentation for this class was generated from the following file: