|
SlHelpers
|
A store for a pointer which is freed in the destructor using sqlite3_free() More...
#include <PtrStore.h>
Public Member Functions | |
| PtrStore (T *t) noexcept | |
Construct a new PtrStore with pointer set to t. | |
| PtrStore (const PtrStore &)=delete | |
| PtrStore & | operator= (const PtrStore &)=delete |
| PtrStore (PtrStore &&other) noexcept | |
| Move constructor. | |
| PtrStore & | operator= (PtrStore &&other) noexcept |
| Move assignment. | |
| bool | valid () const |
| Does this instance hold a valid pointer? | |
| operator bool () const | |
| bool wrapper around valid() | |
| bool | operator! () const |
| ! wrapper around valid() | |
| std::string_view | str () const noexcept requires std |
| Return the current pointer as string. More... | |
| void | reset (T *t=nullptr) |
Set the pointer to t. | |
| T ** | ptr () noexcept |
| Get a pointer to the internal pointer. More... | |
A store for a pointer which is freed in the destructor using sqlite3_free()
|
inlinenoexcept |
Get a pointer to the internal pointer.
Usually to assign to the pointer. The previous pointer is freed if it was valid.
|
inlinenoexcept |
Return the current pointer as string.