![]() |
fb-cpp 0.0.2
A modern C++ wrapper for the Firebird database API
|
RAII lease for an Attachment borrowed from an AttachmentPool. More...
#include <AttachmentPool.h>
Public Member Functions | |
| PooledAttachment (PooledAttachment &&o) noexcept | |
| Move constructor. | |
| PooledAttachment & | operator= (PooledAttachment &&o) noexcept |
| Move assignment. | |
| PooledAttachment (const PooledAttachment &)=delete | |
| PooledAttachment & | operator= (const PooledAttachment &)=delete |
| ~PooledAttachment () noexcept | |
| Returns the Attachment to the pool, unless it was already released. | |
| bool | isValid () const noexcept |
| Returns whether this object currently holds a leased Attachment. | |
| Attachment & | get () noexcept |
| Returns the leased Attachment. | |
| Attachment & | operator* () noexcept |
| Attachment * | operator-> () noexcept |
| void | release () |
| Returns the leased Attachment to the pool immediately. | |
Friends | |
| class | AttachmentPool |
RAII lease for an Attachment borrowed from an AttachmentPool.
The leased Attachment is confined to the thread holding the lease; it is not thread-safe. Returns the Attachment to the pool when the lease is destroyed, unless it was already released.
Definition at line 230 of file AttachmentPool.h.
|
inlinenoexcept |
Move constructor.
A moved PooledAttachment object becomes invalid.
Definition at line 246 of file AttachmentPool.h.
|
inlinenoexcept |
Returns the Attachment to the pool, unless it was already released.
Definition at line 279 of file AttachmentPool.h.
|
inlinenoexcept |
Returns the leased Attachment.
Definition at line 303 of file AttachmentPool.h.
|
inlinenoexcept |
Returns whether this object currently holds a leased Attachment.
Definition at line 295 of file AttachmentPool.h.
|
inlinenoexcept |
Definition at line 309 of file AttachmentPool.h.
|
inlinenoexcept |
Definition at line 314 of file AttachmentPool.h.
|
inlinenoexcept |
Move assignment.
Releases the currently held Attachment (if any) back to the pool before taking ownership of o's.
Definition at line 258 of file AttachmentPool.h.
|
inline |
Returns the leased Attachment to the pool immediately.
Does nothing if the lease was already released.
Definition at line 436 of file AttachmentPool.h.
|
friend |
Definition at line 232 of file AttachmentPool.h.