Asposecpplib
System::DynamicWeakPtr< T, trunkMode, weakLeafs >::Reference Class Reference

Reference class which ensures that DynamicWeakPtr::Apply is called. Used if DynamicWeakPtr is passed as SmartPtr reference parameter to function which may assign to it. More...

Public Member Functions

 Reference (DynamicWeakPtr_ &ptr)
 Creates smart pointer reference. More...
 
 Reference (Reference &&reference) noexcept
 Move-constructs smart pointer reference. More...
 
 ~Reference ()
 Destroys reference. Ensures Apply() call on referenced smart pointer. More...
 
 operator DynamicWeakPtr_ & () const
 Conversion operator. Allows using Reference in contexts where DynamicWeakPtr_ is needed. More...
 

Detailed Description

template<typename T, SmartPtrMode trunkMode, unsigned int ... weakLeafs>
class System::DynamicWeakPtr< T, trunkMode, weakLeafs >::Reference

Reference class which ensures that DynamicWeakPtr::Apply is called. Used if DynamicWeakPtr is passed as SmartPtr reference parameter to function which may assign to it.

Constructor & Destructor Documentation

◆ Reference() [1/2]

template<typename T, SmartPtrMode trunkMode, unsigned int ... weakLeafs>
System::DynamicWeakPtr< T, trunkMode, weakLeafs >::Reference::Reference ( DynamicWeakPtr_ ptr)
inline

Creates smart pointer reference.

Parameters
ptrRaw reference to smart pointer.

◆ Reference() [2/2]

template<typename T, SmartPtrMode trunkMode, unsigned int ... weakLeafs>
System::DynamicWeakPtr< T, trunkMode, weakLeafs >::Reference::Reference ( Reference &&  reference)
inlinenoexcept

Move-constructs smart pointer reference.

Parameters
referenceReference to move.

◆ ~Reference()

template<typename T, SmartPtrMode trunkMode, unsigned int ... weakLeafs>
System::DynamicWeakPtr< T, trunkMode, weakLeafs >::Reference::~Reference ( )
inline

Destroys reference. Ensures Apply() call on referenced smart pointer.

Member Function Documentation

◆ operator DynamicWeakPtr_ &()

template<typename T, SmartPtrMode trunkMode, unsigned int ... weakLeafs>
System::DynamicWeakPtr< T, trunkMode, weakLeafs >::Reference::operator DynamicWeakPtr_ & ( ) const
inline

Conversion operator. Allows using Reference in contexts where DynamicWeakPtr_ is needed.

Returns
Raw reference to referenced smart pointer.