LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
ScopedVclPtrInstance< reference_type > Class Template Referencefinal

A construction helper for ScopedVclPtr. More...

#include <vclptr.hxx>

Inheritance diagram for ScopedVclPtrInstance< reference_type >:
[legend]
Collaboration diagram for ScopedVclPtrInstance< reference_type >:
[legend]

Public Member Functions

template<typename... Arg>
 ScopedVclPtrInstance (Arg &&... arg)
 
- Public Member Functions inherited from ScopedVclPtr< reference_type >
 ScopedVclPtr ()
 Constructor... More...
 
 ScopedVclPtr (reference_type *pBody)
 Constructor. More...
 
 ScopedVclPtr (const VclPtr< reference_type > &handle)
 Copy constructor... More...
 
void disposeAndReset (reference_type *pBody)
 Assignment that releases the last reference. More...
 
ScopedVclPtr< reference_type > & operator= (reference_type *pBody)
 Assignment that releases the last reference. More...
 
template<class derived_type >
 ScopedVclPtr (const VclPtr< derived_type > &rRef, typename std::enable_if< std::is_base_of< reference_type, derived_type >::value, int >::type=0)
 Up-casting conversion constructor: Copies interface reference. More...
 
template<typename derived_type >
std::enable_if< std::is_base_of< reference_type, derived_type >::value, ScopedVclPtr & >::type operator= (VclPtr< derived_type > const &rRef)
 Up-casting assignment operator. More...
 
 ~ScopedVclPtr ()
 
- Public Member Functions inherited from VclPtr< reference_type >
 VclPtr ()
 Constructor... More...
 
 VclPtr (reference_type *pBody)
 Constructor... More...
 
 VclPtr (reference_type *pBody, __sal_NoAcquire)
 Constructor... that doesn't take a ref. More...
 
template<class derived_type >
 VclPtr (const VclPtr< derived_type > &rRef, typename std::enable_if< std::is_base_of< reference_type, derived_type >::value, int >::type=0)
 Up-casting conversion constructor: Copies interface reference. More...
 
 ~VclPtr ()
 
 VclPtr (VclPtr const &)=default
 
 VclPtr (VclPtr &&)=default
 
VclPtroperator= (VclPtr const &)=default
 
VclPtroperator= (VclPtr &&)=default
 
reference_type * operator-> () const
 Probably most common used: handle->someBodyOp(). More...
 
reference_type * get () const
 Get the body. More...
 
void set (reference_type *pBody)
 
void reset (reference_type *pBody)
 
template<typename derived_type >
std::enable_if< std::is_base_of< reference_type, derived_type >::value, VclPtr & >::type operator= (VclPtr< derived_type > const &rRef)
 Up-casting copy assignment operator. More...
 
VclPtroperator= (reference_type *pBody)
 
 operator reference_type * () const
 
 operator bool () const
 
void clear ()
 
void reset ()
 
void disposeAndClear ()
 
bool operator< (const VclPtr< reference_type > &handle) const
 Needed to place VclPtr's into STL collection. More...
 

Static Public Member Functions

template<typename... Arg>
static ScopedVclPtrInstance< reference_type > Create (Arg &&...)=delete
 Override and disallow this, to prevent people accidentally calling it and actually getting VclPtr::Create and getting a naked VclPtr<> instance. More...
 
- Static Public Member Functions inherited from ScopedVclPtr< reference_type >
template<typename... Arg>
static ScopedVclPtr< reference_type > Create (Arg &&...)=delete
 Override and disallow this, to prevent people accidentally calling it and actually getting VclPtr::Create and getting a naked VclPtr<> instance. More...
 
- Static Public Member Functions inherited from VclPtr< reference_type >
template<typename... Arg>
static VclPtr< reference_type > Create (Arg &&... arg)
 A construction helper for VclPtr. More...
 

Private Member Functions

 ScopedVclPtrInstance (ScopedVclPtrInstance &)=delete
 
 ScopedVclPtrInstance (ScopedVclPtrInstance const &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from ScopedVclPtr< reference_type >
 ScopedVclPtr (reference_type *pBody, __sal_NoAcquire)
 

Detailed Description

template<class reference_type>
class ScopedVclPtrInstance< reference_type >

A construction helper for ScopedVclPtr.

Since VclPtr types are created with a reference-count of one - to help fit into the existing code-flow; this helps us to construct them easily.

For more details on the design please see vcl/README.lifecycle

Parameters
reference_typemust be a subclass of vcl::Window

Definition at line 408 of file vclptr.hxx.

Constructor & Destructor Documentation

◆ ScopedVclPtrInstance() [1/3]

template<class reference_type >
template<typename... Arg>
ScopedVclPtrInstance< reference_type >::ScopedVclPtrInstance ( Arg &&...  arg)
inline

Definition at line 411 of file vclptr.hxx.

References Arg, and forward().

◆ ScopedVclPtrInstance() [2/3]

template<class reference_type >
ScopedVclPtrInstance< reference_type >::ScopedVclPtrInstance ( ScopedVclPtrInstance< reference_type > &  )
privatedelete

◆ ScopedVclPtrInstance() [3/3]

template<class reference_type >
ScopedVclPtrInstance< reference_type >::ScopedVclPtrInstance ( ScopedVclPtrInstance< reference_type > const &  )
privatedelete

Member Function Documentation

◆ Create()

template<class reference_type >
template<typename... Arg>
static ScopedVclPtrInstance< reference_type > ScopedVclPtrInstance< reference_type >::Create ( Arg &&  ...)
staticdelete

Override and disallow this, to prevent people accidentally calling it and actually getting VclPtr::Create and getting a naked VclPtr<> instance.

References Arg.


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