Smart pointer types

Smart pointer types. More...


Files

file  PtrTypes.h

Namespaces

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

Classes

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

template<class _D>
std::ostream & zypp::operator<< (std::ostream &str, const shared_ptr< _D > &obj)
template<class _D>
std::ostream & zypp::operator<< (std::ostream &str, const intrusive_ptr< _D > &obj)
std::ostream & zypp::RW_pointer::operator<< (std::ostream &str, const RW_pointer< _D, _Ptr > &obj)
_D * zypp::RWCOW_pointer::rwcowClone (const _D *rhs)
std::ostream & zypp::RWCOW_pointer::operator<< (std::ostream &str, const RWCOW_pointer< _D, _Ptr > &obj)

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

template<class _D>
std::ostream& zypp::operator<< std::ostream &  str,
const shared_ptr< _D > &  obj
[inline]
 

Definition at line 65 of file PtrTypes.h.

template<class _D>
std::ostream& zypp::operator<< std::ostream &  str,
const intrusive_ptr< _D > &  obj
[inline]
 

Definition at line 74 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
std::ostream & operator<< std::ostream &  str,
const RW_pointer< _D, _Ptr > &  obj
[related, inherited]
 

Stream output.

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

Definition at line 245 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
_D * rwcowClone const _D *  rhs  )  [related, inherited]
 

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 347 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
std::ostream & operator<< std::ostream &  str,
const RWCOW_pointer< _D, _Ptr > &  obj
[related, inherited]
 

Stream output.

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

Definition at line 359 of file PtrTypes.h.


Generated on Thu Jul 6 00:07:30 2006 for zypp by  doxygen 1.4.6