libzypp  13.10.6
zypp::RWCOW_pointer< _D, _Traits > Struct Template Reference

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

#include <PtrTypes.h>

Public Types

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

Public Member Functions

 RWCOW_pointer ()
 
 RWCOW_pointer (std::nullptr_t)
 
 RWCOW_pointer (typename _Ptr::element_type *dptr)
 
 RWCOW_pointer (_Ptr dptr)
 
RWCOW_pointeroperator= (std::nullptr_t)
 
void reset ()
 
void reset (typename _Ptr::element_type *dptr)
 
void swap (RWCOW_pointer &rhs)
 
void swap (_Ptr &rhs)
 
 operator bool () 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 ()
 
_constPtr cgetPtr ()
 

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)
 
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

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 438 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 440 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 441 of file PtrTypes.h.

Constructor & Destructor Documentation

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

Definition at line 443 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
zypp::RWCOW_pointer< _D, _Traits >::RWCOW_pointer ( std::nullptr_t  )
inline

Definition at line 446 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
zypp::RWCOW_pointer< _D, _Traits >::RWCOW_pointer ( typename _Ptr::element_type *  dptr)
inlineexplicit

Definition at line 450 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
zypp::RWCOW_pointer< _D, _Traits >::RWCOW_pointer ( _Ptr  dptr)
inlineexplicit

Definition at line 455 of file PtrTypes.h.

Member Function Documentation

template<class _D, class _Traits = rw_pointer::Shared<_D>>
RWCOW_pointer& zypp::RWCOW_pointer< _D, _Traits >::operator= ( std::nullptr_t  )
inline

Definition at line 459 of file PtrTypes.h.

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

Definition at line 462 of file PtrTypes.h.

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 465 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 468 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 471 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
zypp::RWCOW_pointer< _D, _Traits >::operator bool ( ) const
inlineexplicit

Definition at line 474 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 477 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 480 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 483 of file PtrTypes.h.

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

Definition at line 486 of file PtrTypes.h.

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

Definition at line 489 of file PtrTypes.h.

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

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

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

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

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

Definition at line 505 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
_constPtr zypp::RWCOW_pointer< _D, _Traits >::cgetPtr ( )
inline

Definition at line 508 of file PtrTypes.h.

template<class _D, class _Traits = rw_pointer::Shared<_D>>
void zypp::RWCOW_pointer< _D, _Traits >::assertUnshared ( )
inlineprivate

Definition at line 513 of file PtrTypes.h.

Member Data Documentation

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

Definition at line 520 of file PtrTypes.h.


The documentation for this struct was generated from the following file: