Smart pointer types

Smart pointer types. More...


Files

file  PtrTypes.h
 
See also:
Smart pointer types


Namespaces

namespace  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

template<class _D>
std::ostream & shared_ptr::operator<< (std::ostream &str, const shared_ptr< _D > &obj)
 Stream output.
template<class _D>
std::ostream & intrusive_ptr::operator<< (std::ostream &str, const intrusive_ptr< _D > &obj)
 Stream output.
std::ostream & zypp::RW_pointer::operator<< (std::ostream &str, const RW_pointer< _D, _Ptr > &obj)
 Stream output.
_D * zypp::RWCOW_pointer::rwcowClone (const _D *rhs)
 Clone the underlying object.
std::ostream & zypp::RWCOW_pointer::operator<< (std::ostream &str, const RWCOW_pointer< _D, _Ptr > &obj)
 Stream output.

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 & operator<< ( std::ostream &  str,
const shared_ptr< _D > &  obj 
) [related, inherited]

Stream output.

Definition at line 103 of file PtrTypes.h.

References zypp::solver::detail::str.

template<class _D>
std::ostream & operator<< ( std::ostream &  str,
const intrusive_ptr< _D > &  obj 
) [related, inherited]

Stream output.

Definition at line 113 of file PtrTypes.h.

References zypp::solver::detail::str.

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

References zypp::solver::detail::str.

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

Referenced by zypp::RWCOW_pointer< zypp::TranslatedText::Impl >::assertUnshared().

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

References zypp::solver::detail::str.


Generated on Tue Nov 28 16:49:35 2006 for zypp by  doxygen 1.5.0