zypp::RWCOW_pointer< _D, _Traits > Struct Template Reference
[Smart pointer types]

RW_pointer supporting 'copy on write' functionality. More...

#include <PtrTypes.h>

List of all members.

Public Types

typedef _Traits::_Ptr _Ptr
typedef
_Traits::_constPtr 
_constPtr
typedef
_Ptr::unspecified_bool_type 
unspecified_bool_type

Public Member Functions

 RWCOW_pointer (typename _Ptr::element_type *dptr=0)
 RWCOW_pointer (_Ptr dptr)
void reset ()
void reset (typename _Ptr::element_type *dptr)
void swap (RWCOW_pointer &rhs)
void swap (_Ptr &rhs)
 operator unspecified_bool_type () const
const _D & operator * () const
const _D * operator-> () const
const _D * get () const
_D & operator * ()
_D * operator-> ()
_D * get ()
bool unique () const
long use_count () const
_constPtr getPtr () const
_Ptr getPtr ()

Private Member Functions

void assertUnshared ()

Private Attributes

_Ptr _dptr

Related Functions

(Note that these are not member functions.)

template<class _D>
_D * rwcowClone (const _D *rhs)
 Clone the underlying object.
template<class _D, class _Ptr>
std::ostream & operator<< (std::ostream &str, const RWCOW_pointer< _D, _Ptr > &obj)
 Stream output.
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 RWCOW_pointer< _D, _Ptr > &rhs)


Detailed Description

template<class _D, class _Traits = rw_pointer::Shared<_D>>
struct zypp::RWCOW_pointer< _D, _Traits >

RW_pointer supporting 'copy on write' functionality.

Write access to the underlying object creates a copy, iff the object is shared.

See RW_pointer.

Definition at line 360 of file PtrTypes.h.


Member Typedef Documentation

template<class _D, class _Traits = rw_pointer::Shared<_D>>
typedef _Traits::_Ptr zypp::RWCOW_pointer< _D, _Traits >::_Ptr

Definition at line 362 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
typedef _Traits::_constPtr zypp::RWCOW_pointer< _D, _Traits >::_constPtr

Definition at line 363 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
typedef _Ptr::unspecified_bool_type zypp::RWCOW_pointer< _D, _Traits >::unspecified_bool_type

Definition at line 364 of file PtrTypes.h.


Constructor & Destructor Documentation

template<class _D, class _Traits = rw_pointer::Shared<_D>>
zypp::RWCOW_pointer< _D, _Traits >::RWCOW_pointer ( typename _Ptr::element_type *  dptr = 0  )  [inline, explicit]

Definition at line 367 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
zypp::RWCOW_pointer< _D, _Traits >::RWCOW_pointer ( _Ptr  dptr  )  [inline, explicit]

Definition at line 372 of file PtrTypes.h.


Member Function Documentation

template<class _D, class _Traits = rw_pointer::Shared<_D>>
void zypp::RWCOW_pointer< _D, _Traits >::reset (  )  [inline]

Definition at line 376 of file PtrTypes.h.

Referenced by zypp::Url::parseUrl(), and zypp::Url::setScheme().

template<class _D, class _Traits = rw_pointer::Shared<_D>>
void zypp::RWCOW_pointer< _D, _Traits >::reset ( typename _Ptr::element_type *  dptr  )  [inline]

Definition at line 379 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
void zypp::RWCOW_pointer< _D, _Traits >::swap ( RWCOW_pointer< _D, _Traits > &  rhs  )  [inline]

Definition at line 382 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
void zypp::RWCOW_pointer< _D, _Traits >::swap ( _Ptr rhs  )  [inline]

Definition at line 385 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
zypp::RWCOW_pointer< _D, _Traits >::operator unspecified_bool_type (  )  const [inline]

Definition at line 388 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
const _D& zypp::RWCOW_pointer< _D, _Traits >::operator * (  )  const [inline]

Definition at line 391 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
const _D* zypp::RWCOW_pointer< _D, _Traits >::operator-> (  )  const [inline]

Definition at line 394 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
const _D* zypp::RWCOW_pointer< _D, _Traits >::get (  )  const [inline]

Definition at line 397 of file PtrTypes.h.

Referenced by zypp::RWCOW_pointer< _D, _Traits >::operator==().

template<class _D, class _Traits = rw_pointer::Shared<_D>>
_D& zypp::RWCOW_pointer< _D, _Traits >::operator * (  )  [inline]

Definition at line 400 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
_D* zypp::RWCOW_pointer< _D, _Traits >::operator-> (  )  [inline]

Definition at line 403 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
_D* zypp::RWCOW_pointer< _D, _Traits >::get (  )  [inline]

Definition at line 406 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
bool zypp::RWCOW_pointer< _D, _Traits >::unique (  )  const [inline]

Definition at line 410 of file PtrTypes.h.

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

template<class _D, class _Traits = rw_pointer::Shared<_D>>
long zypp::RWCOW_pointer< _D, _Traits >::use_count (  )  const [inline]

Definition at line 413 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
_constPtr zypp::RWCOW_pointer< _D, _Traits >::getPtr (  )  const [inline]

Definition at line 416 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
_Ptr zypp::RWCOW_pointer< _D, _Traits >::getPtr (  )  [inline]

Definition at line 419 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
void zypp::RWCOW_pointer< _D, _Traits >::assertUnshared (  )  [inline, private]

Definition at line 424 of file PtrTypes.h.

Referenced by zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::get(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::getPtr(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::operator *(), and zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::operator->().


Member Data Documentation

template<class _D, class _Traits = rw_pointer::Shared<_D>>
_Ptr zypp::RWCOW_pointer< _D, _Traits >::_dptr [private]

Definition at line 431 of file PtrTypes.h.

Referenced by zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::assertUnshared(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::get(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::getPtr(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::operator *(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::operator unspecified_bool_type(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::operator->(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::reset(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::swap(), zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::unique(), and zypp::RWCOW_pointer< zypp::cache::CacheFSCK::Impl >::use_count().


The documentation for this struct was generated from the following file:
Generated on Tue Sep 25 19:23:14 2007 for libzypp by  doxygen 1.5.3