libzypp  15.28.6
Smart pointer types

Smart pointer types. More...

Files

file  PtrTypes.h
 

Namespaces

 zypp::rw_pointer
 Don't forgett to provide versions for PtrType and constPtrType, esp.
 

Classes

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

Functions

std::string zypp::str::form (const char *format,...) __attribute__((format(printf
 Printf style construction of std::string. More...
 
void zypp::NullDeleter::operator() (const void *const ) const
 
template<>
std::ostream & std::operator<< (std::ostream &str, const zypp::shared_ptr< void > &obj)
 
template<>
std::ostream & std::dumpOn (std::ostream &str, const zypp::shared_ptr< void > &obj)
 
template<class D , class DPtr >
std::ostream & operator<< (std::ostream &str, const RW_pointer< D, DPtr > &obj)
 
template<class D , class DPtr >
bool operator== (const RW_pointer< D, DPtr > &lhs, const RW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator== (const RW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
 
template<class D , class DPtr >
bool operator== (const typename DPtr::PtrType &lhs, const RW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator== (const RW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
 
template<class D , class DPtr >
bool operator== (const typename DPtr::constPtrType &lhs, const RW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator== (const RW_pointer< D, DPtr > &lhs, std::nullptr_t)
 
template<class D , class DPtr >
bool operator== (std::nullptr_t, const RW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator!= (const RW_pointer< D, DPtr > &lhs, const RW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator!= (const RW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
 
template<class D , class DPtr >
bool operator!= (const typename DPtr::PtrType &lhs, const RW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator!= (const RW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
 
template<class D , class DPtr >
bool operator!= (const typename DPtr::constPtrType &lhs, const RW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator!= (const RW_pointer< D, DPtr > &lhs, std::nullptr_t)
 
template<class D , class DPtr >
bool operator!= (std::nullptr_t, const RW_pointer< D, DPtr > &rhs)
 
template<class D >
D * rwcowClone (const D *rhs)
 
template<class D , class DPtr >
std::ostream & operator<< (std::ostream &str, const RWCOW_pointer< D, DPtr > &obj)
 
template<class D , class DPtr >
bool operator== (const RWCOW_pointer< D, DPtr > &lhs, const RWCOW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator== (const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
 
template<class D , class DPtr >
bool operator== (const typename DPtr::PtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator== (const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
 
template<class D , class DPtr >
bool operator== (const typename DPtr::constPtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator== (const RWCOW_pointer< D, DPtr > &lhs, std::nullptr_t)
 
template<class D , class DPtr >
bool operator== (std::nullptr_t, const RWCOW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator!= (const RWCOW_pointer< D, DPtr > &lhs, const RWCOW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator!= (const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::PtrType &rhs)
 
template<class D , class DPtr >
bool operator!= (const typename DPtr::PtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator!= (const RWCOW_pointer< D, DPtr > &lhs, const typename DPtr::constPtrType &rhs)
 
template<class D , class DPtr >
bool operator!= (const typename DPtr::constPtrType &lhs, const RWCOW_pointer< D, DPtr > &rhs)
 
template<class D , class DPtr >
bool operator!= (const RWCOW_pointer< D, DPtr > &lhs, std::nullptr_t)
 
template<class D , class DPtr >
bool operator!= (std::nullptr_t, const RWCOW_pointer< D, DPtr > &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

std::string zypp::str::form ( const char *  format,
  ... 
)

Printf style construction of std::string.

Definition at line 36 of file String.cc.

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

Definition at line 84 of file PtrTypes.h.

template<>
std::ostream& std::operator<< ( std::ostream &  str,
const zypp::shared_ptr< void > &  obj 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 134 of file PtrTypes.h.

template<>
std::ostream& std::dumpOn ( std::ostream &  str,
const zypp::shared_ptr< void > &  obj 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 151 of file PtrTypes.h.

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

Stream output.

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

Definition at line 369 of file PtrTypes.h.

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

Definition at line 378 of file PtrTypes.h.

template<class D , class DPtr >
bool operator== ( const RW_pointer< D, DPtr > &  lhs,
const typename DPtr::PtrType &  rhs 
)
related

Definition at line 382 of file PtrTypes.h.

template<class D , class DPtr >
bool operator== ( const typename DPtr::PtrType &  lhs,
const RW_pointer< D, DPtr > &  rhs 
)
related

Definition at line 386 of file PtrTypes.h.

template<class D , class DPtr >
bool operator== ( const RW_pointer< D, DPtr > &  lhs,
const typename DPtr::constPtrType &  rhs 
)
related

Definition at line 390 of file PtrTypes.h.

template<class D , class DPtr >
bool operator== ( const typename DPtr::constPtrType &  lhs,
const RW_pointer< D, DPtr > &  rhs 
)
related

Definition at line 394 of file PtrTypes.h.

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

Definition at line 398 of file PtrTypes.h.

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

Definition at line 402 of file PtrTypes.h.

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

Definition at line 408 of file PtrTypes.h.

template<class D , class DPtr >
bool operator!= ( const RW_pointer< D, DPtr > &  lhs,
const typename DPtr::PtrType &  rhs 
)
related

Definition at line 412 of file PtrTypes.h.

template<class D , class DPtr >
bool operator!= ( const typename DPtr::PtrType &  lhs,
const RW_pointer< D, DPtr > &  rhs 
)
related

Definition at line 416 of file PtrTypes.h.

template<class D , class DPtr >
bool operator!= ( const RW_pointer< D, DPtr > &  lhs,
const typename DPtr::constPtrType &  rhs 
)
related

Definition at line 420 of file PtrTypes.h.

template<class D , class DPtr >
bool operator!= ( const typename DPtr::constPtrType &  lhs,
const RW_pointer< D, DPtr > &  rhs 
)
related

Definition at line 424 of file PtrTypes.h.

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

Definition at line 428 of file PtrTypes.h.

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

Definition at line 432 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 443 of file PtrTypes.h.

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

Stream output.

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

Definition at line 550 of file PtrTypes.h.

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

Definition at line 559 of file PtrTypes.h.

template<class D , class DPtr >
bool operator== ( const RWCOW_pointer< D, DPtr > &  lhs,
const typename DPtr::PtrType &  rhs 
)
related

Definition at line 563 of file PtrTypes.h.

template<class D , class DPtr >
bool operator== ( const typename DPtr::PtrType &  lhs,
const RWCOW_pointer< D, DPtr > &  rhs 
)
related

Definition at line 567 of file PtrTypes.h.

template<class D , class DPtr >
bool operator== ( const RWCOW_pointer< D, DPtr > &  lhs,
const typename DPtr::constPtrType &  rhs 
)
related

Definition at line 571 of file PtrTypes.h.

template<class D , class DPtr >
bool operator== ( const typename DPtr::constPtrType &  lhs,
const RWCOW_pointer< D, DPtr > &  rhs 
)
related

Definition at line 575 of file PtrTypes.h.

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

Definition at line 579 of file PtrTypes.h.

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

Definition at line 583 of file PtrTypes.h.

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

Definition at line 588 of file PtrTypes.h.

template<class D , class DPtr >
bool operator!= ( const RWCOW_pointer< D, DPtr > &  lhs,
const typename DPtr::PtrType &  rhs 
)
related

Definition at line 592 of file PtrTypes.h.

template<class D , class DPtr >
bool operator!= ( const typename DPtr::PtrType &  lhs,
const RWCOW_pointer< D, DPtr > &  rhs 
)
related

Definition at line 596 of file PtrTypes.h.

template<class D , class DPtr >
bool operator!= ( const RWCOW_pointer< D, DPtr > &  lhs,
const typename DPtr::constPtrType &  rhs 
)
related

Definition at line 600 of file PtrTypes.h.

template<class D , class DPtr >
bool operator!= ( const typename DPtr::constPtrType &  lhs,
const RWCOW_pointer< D, DPtr > &  rhs 
)
related

Definition at line 604 of file PtrTypes.h.

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

Definition at line 608 of file PtrTypes.h.

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

Definition at line 612 of file PtrTypes.h.