PLCnext API Documentation  22.9.0.33
Public Types | Public Member Functions | List of all members
Arp::PimplPtr< T, Copyable > Class Template Reference

Small wrapper class to ensure const correctness using PImpl pattern. More...

#include <PimplPtr.hxx>

Public Types

using Impl = T
 
using ImplPtr = std::unique_ptr< Impl >
 

Public Member Functions

template<class ... Args>
ARP_CXX_SYMBOL_EXPORT PimplPtr (Args &&... args)
 Constructs an PImpl instance using the supplied arguments. More...
 
 PimplPtr (const PimplPtr &arg)=delete
 Copy constructor. More...
 
ARP_CXX_SYMBOL_EXPORT PimplPtr (PimplPtr &&arg) noexcept
 Move constructor. More...
 
PimplPtroperator= (const PimplPtr &arg)=delete
 Assignment operator. More...
 
ARP_CXX_SYMBOL_EXPORT PimplPtroperator= (PimplPtr &&arg) noexcept
 Assignment move operator. More...
 
ARP_CXX_SYMBOL_EXPORT ~PimplPtr (void)
 Destructs this instance and frees all resources. More...
 
ARP_CXX_SYMBOL_EXPORT Impl * operator-> (void)
 Gets the pointer to the Impl instance for none const objects. More...
 
ARP_CXX_SYMBOL_EXPORT const Impl * operator-> (void) const
 Gets the pointer to the const Impl instance for const objects. More...
 
ARP_CXX_SYMBOL_EXPORT Impl & operator* (void)
 Gets the reference to the Impl instance for none const objects. More...
 
ARP_CXX_SYMBOL_EXPORT const Impl & operator* (void) const
 Gets the reference to the const Impl instance for const objects. More...
 
ARP_CXX_SYMBOL_EXPORT operator bool (void) const noexcept
 Checks if the pointer points to a valid object More...
 

Detailed Description

template<class T, bool Copyable = false>
class Arp::PimplPtr< T, Copyable >

Small wrapper class to ensure const correctness using PImpl pattern.

Constructor & Destructor Documentation

◆ PimplPtr() [1/3]

template<class T , bool Copyable = false>
template<class ... Args>
ARP_CXX_SYMBOL_EXPORT Arp::PimplPtr< T, Copyable >::PimplPtr ( Args &&...  args)
explicit

Constructs an PImpl instance using the supplied arguments.

◆ PimplPtr() [2/3]

template<class T , bool Copyable = false>
Arp::PimplPtr< T, Copyable >::PimplPtr ( const PimplPtr< T, Copyable > &  arg)
delete

Copy constructor.

◆ PimplPtr() [3/3]

template<class T , bool Copyable = false>
ARP_CXX_SYMBOL_EXPORT Arp::PimplPtr< T, Copyable >::PimplPtr ( PimplPtr< T, Copyable > &&  arg)
noexcept

Move constructor.

◆ ~PimplPtr()

template<class T , bool Copyable = false>
ARP_CXX_SYMBOL_EXPORT Arp::PimplPtr< T, Copyable >::~PimplPtr ( void  )

Destructs this instance and frees all resources.

Member Function Documentation

◆ operator bool()

template<class T , bool Copyable = false>
ARP_CXX_SYMBOL_EXPORT Arp::PimplPtr< T, Copyable >::operator bool ( void  ) const
explicitnoexcept

Checks if the pointer points to a valid object

◆ operator*() [1/2]

template<class T , bool Copyable = false>
ARP_CXX_SYMBOL_EXPORT Impl& Arp::PimplPtr< T, Copyable >::operator* ( void  )

Gets the reference to the Impl instance for none const objects.

◆ operator*() [2/2]

template<class T , bool Copyable = false>
ARP_CXX_SYMBOL_EXPORT const Impl& Arp::PimplPtr< T, Copyable >::operator* ( void  ) const

Gets the reference to the const Impl instance for const objects.

◆ operator->() [1/2]

template<class T , bool Copyable = false>
ARP_CXX_SYMBOL_EXPORT Impl* Arp::PimplPtr< T, Copyable >::operator-> ( void  )

Gets the pointer to the Impl instance for none const objects.

◆ operator->() [2/2]

template<class T , bool Copyable = false>
ARP_CXX_SYMBOL_EXPORT const Impl* Arp::PimplPtr< T, Copyable >::operator-> ( void  ) const

Gets the pointer to the const Impl instance for const objects.

◆ operator=() [1/2]

template<class T , bool Copyable = false>
PimplPtr& Arp::PimplPtr< T, Copyable >::operator= ( const PimplPtr< T, Copyable > &  arg)
delete

Assignment operator.

◆ operator=() [2/2]

template<class T , bool Copyable = false>
ARP_CXX_SYMBOL_EXPORT PimplPtr& Arp::PimplPtr< T, Copyable >::operator= ( PimplPtr< T, Copyable > &&  arg)
noexcept

Assignment move operator.


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