libzypp 17.31.0
zypp::AutoFREE< Tp > Struct Template Reference

#include <AutoDispose.h>

Inheritance diagram for zypp::AutoFREE< Tp >:

Public Member Functions

 AutoFREE (Tp *ptr_r=nullptr)
 
 AutoFREE (void *ptr_r)
 
- Public Member Functions inherited from zypp::AutoDispose< Tp * >
 AutoDispose ()
 Default Ctor using default constructed value and no dispose function. More...
 
 AutoDispose (const Dispose &dispose_r)
 Ctor taking dispose function and using default constructed value. More...
 
 AutoDispose (const value_type &value_r)
 Ctor taking value and no dispose function. More...
 
 AutoDispose (const value_type &value_r, const Dispose &dispose_r)
 Ctor taking value and dispose function. More...
 
 AutoDispose (value_type &&value_r)
 Ctor taking rvalue and no dispose function. More...
 
 AutoDispose (value_type &&value_r, const Dispose &dispose_r)
 Ctor taking rvalue and dispose function. More...
 
 operator reference () const
 Provide implicit conversion to Tp&. More...
 
reference value () const
 Reference to the Tp object. More...
 
reference operator* () const
 Reference to the Tp object. More...
 
value_typeoperator-> () const
 Pointer to the Tp object (asserted to be != NULL). More...
 
void reset ()
 Reset to default Ctor values. More...
 
void swap (AutoDispose &rhs)
 Exchange the contents of two AutoDispose objects. More...
 
bool unique () const
 Returns true if this is the only AutoDispose instance managing the current data object. More...
 
const DisposegetDispose () const
 Return the current dispose function. More...
 
void setDispose (const Dispose &dispose_r)
 Set a new dispose function. More...
 
void resetDispose ()
 Set no dispose function. More...
 
void swapDispose (Dispose &dispose_r)
 Exchange the dispose function. More...
 

Additional Inherited Members

- Public Types inherited from zypp::AutoDispose< Tp * >
typedef boost::call_traits< Tp * >::param_type param_type
 
typedef boost::call_traits< Tp * >::reference reference
 
typedef boost::call_traits< Tp * >::const_reference const_reference
 
typedef Tp * value_type
 
typedef boost::call_traits< Tp * >::value_type result_type
 
using dispose_param_type = typename std::conditional< std::is_pointer< Tp * >::value||std::is_integral< Tp * >::value, Tp * const, reference >::type
 
using Dispose = function< void(dispose_param_type)>
 Dispose function signatue. More...
 

Detailed Description

template<typename Tp>
struct zypp::AutoFREE< Tp >

Definition at line 322 of file AutoDispose.h.

Constructor & Destructor Documentation

◆ AutoFREE() [1/2]

template<typename Tp >
zypp::AutoFREE< Tp >::AutoFREE ( Tp *  ptr_r = nullptr)
inline

Definition at line 324 of file AutoDispose.h.

◆ AutoFREE() [2/2]

template<typename Tp >
zypp::AutoFREE< Tp >::AutoFREE ( void *  ptr_r)
inline

Definition at line 325 of file AutoDispose.h.


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