libzypp  13.10.6
Smart pointer types

Smart pointer types. More...

Files

file  PtrTypes.h
 

Namespaces

 zypp::rw_pointer
 Don't forgett to provide versions for _Ptr and _constPtr, esp.
 

Classes

struct  zypp::NullDeleter
 shared_ptr custom deleter doing nothing. More...
 
struct  zypp::RW_pointer< _D, _Traits >
 Wrapper for const correct access via Smart pointer types. More...
 
struct  zypp::RWCOW_pointer< _D, _Traits >
 RW_pointer supporting 'copy on write' functionality. More...
 
class  scoped_ptr
 
class  shared_ptr
 
class  weak_ptr
 
class  intrusive_ptr
 

Functions

void zypp::NullDeleter::operator() (const void *const ) const
 
template<class _D , class _Ptr >
std::ostream & operator<< (std::ostream &str, const RW_pointer< _D, _Ptr > &obj)
 
template<class _D , class _Ptr >
bool operator== (const RW_pointer< _D, _Ptr > &lhs, const RW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator== (const RW_pointer< _D, _Ptr > &lhs, const typename _Ptr::_Ptr &rhs)
 
template<class _D , class _Ptr >
bool operator== (const typename _Ptr::_Ptr &lhs, const RW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator== (const RW_pointer< _D, _Ptr > &lhs, const typename _Ptr::_constPtr &rhs)
 
template<class _D , class _Ptr >
bool operator== (const typename _Ptr::_constPtr &lhs, const RW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator== (const RW_pointer< _D, _Ptr > &lhs, std::nullptr_t)
 
template<class _D , class _Ptr >
bool operator== (std::nullptr_t, const RW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const RW_pointer< _D, _Ptr > &lhs, const RW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const RW_pointer< _D, _Ptr > &lhs, const typename _Ptr::_Ptr &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const typename _Ptr::_Ptr &lhs, const RW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const RW_pointer< _D, _Ptr > &lhs, const typename _Ptr::_constPtr &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const typename _Ptr::_constPtr &lhs, const RW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const RW_pointer< _D, _Ptr > &lhs, std::nullptr_t)
 
template<class _D , class _Ptr >
bool operator!= (std::nullptr_t, const RW_pointer< _D, _Ptr > &rhs)
 
template<class _D >
_D * rwcowClone (const _D *rhs)
 
template<class _D , class _Ptr >
std::ostream & operator<< (std::ostream &str, const RWCOW_pointer< _D, _Ptr > &obj)
 
template<class _D , class _Ptr >
bool operator== (const RWCOW_pointer< _D, _Ptr > &lhs, const RWCOW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator== (const RWCOW_pointer< _D, _Ptr > &lhs, const typename _Ptr::_Ptr &rhs)
 
template<class _D , class _Ptr >
bool operator== (const typename _Ptr::_Ptr &lhs, const RWCOW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator== (const RWCOW_pointer< _D, _Ptr > &lhs, const typename _Ptr::_constPtr &rhs)
 
template<class _D , class _Ptr >
bool operator== (const typename _Ptr::_constPtr &lhs, const RWCOW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator== (const RWCOW_pointer< _D, _Ptr > &lhs, std::nullptr_t)
 
template<class _D , class _Ptr >
bool operator== (std::nullptr_t, const RWCOW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const RWCOW_pointer< _D, _Ptr > &lhs, const RWCOW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const RWCOW_pointer< _D, _Ptr > &lhs, const typename _Ptr::_Ptr &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const typename _Ptr::_Ptr &lhs, const RWCOW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const RWCOW_pointer< _D, _Ptr > &lhs, const typename _Ptr::_constPtr &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const typename _Ptr::_constPtr &lhs, const RWCOW_pointer< _D, _Ptr > &rhs)
 
template<class _D , class _Ptr >
bool operator!= (const RWCOW_pointer< _D, _Ptr > &lhs, std::nullptr_t)
 
template<class _D , class _Ptr >
bool operator!= (std::nullptr_t, const RWCOW_pointer< _D, _Ptr > &rhs)
 

Detailed Description

Smart pointer types.

Namespace zypp provides 3 smart pointer types using the boost smart pointer library.

And zypp::RW_pointer, as wrapper around a smart pointer, poviding const correct read/write access to the object it refers.

Function Documentation

void zypp::NullDeleter::operator() ( const void *  const) const
inline

Definition at line 77 of file PtrTypes.h.

template<class _D , class _Ptr >
std::ostream & operator<< ( std::ostream &  str,
const RW_pointer< _D, _Ptr > &  obj 
)
related

Stream output.

Print the _D object the RW_pointer refers, or "NULL" if the pointer is NULL.

Definition at line 349 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const RW_pointer< _D, _Ptr > &  lhs,
const RW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 358 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const RW_pointer< _D, _Ptr > &  lhs,
const typename _Ptr::_Ptr &  rhs 
)
related

Definition at line 362 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const typename _Ptr::_Ptr &  lhs,
const RW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 366 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const RW_pointer< _D, _Ptr > &  lhs,
const typename _Ptr::_constPtr &  rhs 
)
related

Definition at line 370 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const typename _Ptr::_constPtr &  lhs,
const RW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 374 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const RW_pointer< _D, _Ptr > &  lhs,
std::nullptr_t   
)
related

Definition at line 378 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( std::nullptr_t  ,
const RW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 382 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const RW_pointer< _D, _Ptr > &  lhs,
const RW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 388 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const RW_pointer< _D, _Ptr > &  lhs,
const typename _Ptr::_Ptr &  rhs 
)
related

Definition at line 392 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const typename _Ptr::_Ptr &  lhs,
const RW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 396 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const RW_pointer< _D, _Ptr > &  lhs,
const typename _Ptr::_constPtr &  rhs 
)
related

Definition at line 400 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const typename _Ptr::_constPtr &  lhs,
const RW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 404 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const RW_pointer< _D, _Ptr > &  lhs,
std::nullptr_t   
)
related

Definition at line 408 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( std::nullptr_t  ,
const RW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 412 of file PtrTypes.h.

template<class _D >
_D * rwcowClone ( const _D *  rhs)
related

Clone the underlying object. Calls rhs ->clone(). Being defined as a function outside RWCOW_pointer allows to overload it, in case a specific _D does not have clone().

Definition at line 423 of file PtrTypes.h.

template<class _D , class _Ptr >
std::ostream & operator<< ( std::ostream &  str,
const RWCOW_pointer< _D, _Ptr > &  obj 
)
related

Stream output.

Print the _D object the RWCOW_pointer refers, or "NULL" if the pointer is NULL.

Definition at line 530 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const RWCOW_pointer< _D, _Ptr > &  lhs,
const RWCOW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 539 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const RWCOW_pointer< _D, _Ptr > &  lhs,
const typename _Ptr::_Ptr &  rhs 
)
related

Definition at line 543 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const typename _Ptr::_Ptr &  lhs,
const RWCOW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 547 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const RWCOW_pointer< _D, _Ptr > &  lhs,
const typename _Ptr::_constPtr &  rhs 
)
related

Definition at line 551 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const typename _Ptr::_constPtr &  lhs,
const RWCOW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 555 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( const RWCOW_pointer< _D, _Ptr > &  lhs,
std::nullptr_t   
)
related

Definition at line 559 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator== ( std::nullptr_t  ,
const RWCOW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 563 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const RWCOW_pointer< _D, _Ptr > &  lhs,
const RWCOW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 568 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const RWCOW_pointer< _D, _Ptr > &  lhs,
const typename _Ptr::_Ptr &  rhs 
)
related

Definition at line 572 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const typename _Ptr::_Ptr &  lhs,
const RWCOW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 576 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const RWCOW_pointer< _D, _Ptr > &  lhs,
const typename _Ptr::_constPtr &  rhs 
)
related

Definition at line 580 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const typename _Ptr::_constPtr &  lhs,
const RWCOW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 584 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( const RWCOW_pointer< _D, _Ptr > &  lhs,
std::nullptr_t   
)
related

Definition at line 588 of file PtrTypes.h.

template<class _D , class _Ptr >
bool operator!= ( std::nullptr_t  ,
const RWCOW_pointer< _D, _Ptr > &  rhs 
)
related

Definition at line 592 of file PtrTypes.h.