lean cpp library
A lean C++ library providing efficient utility classes for high-performance C++ applications.
Public Types | Public Member Functions
lean::pimpl::pimpl_ptr< Implementation, ImplementationBase, DestroyPolicy > Class Template Reference

Smart pointer class allowing for secure storage of forward-declared pimpl classes. More...

#include <pimpl_ptr.h>

Inherits noncopyable.

List of all members.

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_ptroperator= (Implementation *impl)
 Deletes any implementation stored, storing the given new implementation in this pimpl pointer.
pimpl_ptroperator= (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.

Detailed Description

template<class Implementation, class ImplementationBase = Implementation, class DestroyPolicy = pimpl_delete_policy>
class lean::pimpl::pimpl_ptr< Implementation, ImplementationBase, DestroyPolicy >

Smart pointer class allowing for secure storage of forward-declared pimpl classes.


The documentation for this class was generated from the following file: