|
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 |
| Return the current pointer as string. | |
| const T * | get () const noexcept |
| Get the stored pointer. | |
| T * | get () noexcept |
| Get the stored pointer. | |
| T * | operator* () noexcept |
| Get the stored pointer. | |
| const T * | operator* () const noexcept |
| Get the stored pointer. | |
| T * | operator-> () noexcept |
| Get the stored pointer. | |
| const T * | operator-> () const noexcept |
| Get the stored pointer. | |
| T * | release () |
| Return the pointer and stop owning it. | |
| void | reset (T *t=nullptr) |
Set the pointer to t. | |
| T ** | ptr () noexcept |
| Get a pointer to the internal pointer. | |
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.