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.

## 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::client & | operator* ()
| Access the managed client.
v1::client * | operator-> ()
| Access the managed client.
entry & | operator= (entry &&other) noexcept
| Move assignment.
entry & | operator= (entry const &other)=delete
| This class is not copyable.
entry & | operator= (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:

- mongocxx/v1/pool.hpp