lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
|
Smart pointer class allowing for secure storage of forward-declared pimpl classes. More...
#include <pimpl_ptr.h>
Inherits noncopyable.
Public Types | |
typedef Implementation | implementation_type |
Type of the implementation stored by this pimpl pointer. | |
typedef ImplementationBase | base_type |
Base type of the implementation stored by this pimpl pointer. | |
Public Member Functions | |
LEAN_INLINE | pimpl_ptr (Implementation *impl) |
Constructs a pimpl pointer from the given implementation. | |
LEAN_INLINE | pimpl_ptr (pimpl_ptr &&right) |
Moves the implementation managed by the given pimpl pointer to this pimpl pointer. | |
LEAN_INLINE | ~pimpl_ptr () throw () |
Destructs this pimpl pointer, deleting any implementation stored. | |
pimpl_ptr & | operator= (Implementation *impl) |
Deletes any implementation stored, storing the given new implementation in this pimpl pointer. | |
pimpl_ptr & | operator= (pimpl_ptr &&right) |
Moves the implementation managed by the given pimpl pointer to this pimpl pointer. | |
Implementation * | unbind () |
Retrieves the implementation stored, clearing this pimpl pointer to nullptr. | |
LEAN_INLINE Implementation * | getptr (void) |
Gets the implementation managed by this pimpl pointer. | |
LEAN_INLINE const Implementation * | getptr (void) const |
Gets the implementation managed by this pimpl pointer. | |
LEAN_INLINE Implementation & | get (void) |
Gets the implementation managed by this pimpl pointer. | |
LEAN_INLINE const Implementation & | get (void) const |
Gets the implementation managed by this pimpl pointer. | |
LEAN_INLINE bool | empty (void) |
Checks wehther this pimpl pointer is currently empty. | |
LEAN_INLINE Implementation & | operator* () |
Gets the implementation managed by this pimpl pointer. | |
LEAN_INLINE const Implementation & | operator* () const |
Gets the implementation managed by this pimpl pointer. | |
LEAN_INLINE Implementation * | operator-> () |
Gets the implementation managed by this pimpl pointer. | |
LEAN_INLINE const Implementation * | operator-> () const |
Gets the implementation managed by this pimpl pointer. |
Smart pointer class allowing for secure storage of forward-declared pimpl classes.