Refureku v2.2.0
C++17 runtime reflection library.
rfk::Pimpl< T > Class Template Reference

#include <Pimpl.h>

Public Member Functions

 Pimpl (T *implementation) noexcept
 
 Pimpl (Pimpl const &other)
 
 Pimpl (Pimpl &&other) noexcept
 
T * get () noexcept
 Retrieve a pointer to the underlying object. More...
 
T const * get () const noexcept
 Retrieve a const pointer to the underlying object. More...
 
void uncheckedSet (T *impl) noexcept
 Set a new implementation without checking the state of the previous one. WARNING: If a valid implementation was set before, it is not deleted!!
 
Pimploperator= (Pimpl const &other)
 
Pimploperator= (Pimpl &&other) noexcept
 
T * operator-> () noexcept
 Retrieve a pointer to the underlying object. More...
 
T const * operator-> () const noexcept
 Retrieve a const pointer to the underlying object. More...
 
T & operator* () noexcept
 Retrieve a reference to the underlying object. More...
 
T const & operator* () const noexcept
 Retrieve a const reference to the underlying object. More...
 

Detailed Description

template<typename T>
class rfk::Pimpl< T >

Utility class used for the pimpl (pointer to implementation) idiom. It holds a pointer to the underlying class and propagates constness.

Member Function Documentation

◆ get() [1/2]

template<typename T >
T const * rfk::Pimpl< T >::get ( ) const
noexcept

Retrieve a const pointer to the underlying object.

Returns
The const underlying object.

◆ get() [2/2]

template<typename T >
T * rfk::Pimpl< T >::get ( )
noexcept

Retrieve a pointer to the underlying object.

Returns
The underlying object.

◆ operator*() [1/2]

template<typename T >
T const & rfk::Pimpl< T >::operator* ( ) const
noexcept

Retrieve a const reference to the underlying object.

Returns
The const underlying object.

◆ operator*() [2/2]

template<typename T >
T & rfk::Pimpl< T >::operator* ( )
noexcept

Retrieve a reference to the underlying object.

Returns
The underlying object.

◆ operator->() [1/2]

template<typename T >
T const * rfk::Pimpl< T >::operator-> ( ) const
noexcept

Retrieve a const pointer to the underlying object.

Returns
The const underlying object.

◆ operator->() [2/2]

template<typename T >
T * rfk::Pimpl< T >::operator-> ( )
noexcept

Retrieve a pointer to the underlying object.

Returns
The underlying object.

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