libzypp  17.23.5
zypp::RWCOW_pointer< D, DTraits > Struct Template Reference

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

#include <PtrTypes.h>

Public Types

typedef DTraits::PtrType PtrType
 
typedef DTraits::constPtrType constPtrType
 

Public Member Functions

 RWCOW_pointer ()
 
 RWCOW_pointer (std::nullptr_t)
 
 RWCOW_pointer (typename PtrType::element_type *dptr)
 
 RWCOW_pointer (PtrType dptr)
 
RWCOW_pointeroperator= (std::nullptr_t)
 
void reset ()
 
void reset (typename PtrType::element_type *dptr)
 
void swap (RWCOW_pointer &rhs)
 
void swap (PtrType &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
 
constPtrType getPtr () const
 
PtrType getPtr ()
 
constPtrType cgetPtr ()
 

Private Member Functions

void assertUnshared ()
 

Private Attributes

PtrType _dptr
 

Related Functions

(Note that these are not member functions.)

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

template<class D, class DTraits = rw_pointer::Shared<D>>
struct zypp::RWCOW_pointer< D, DTraits >

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

Member Typedef Documentation

◆ PtrType

template<class D, class DTraits = rw_pointer::Shared<D>>
typedef DTraits::PtrType zypp::RWCOW_pointer< D, DTraits >::PtrType

Definition at line 460 of file PtrTypes.h.

◆ constPtrType

template<class D, class DTraits = rw_pointer::Shared<D>>
typedef DTraits::constPtrType zypp::RWCOW_pointer< D, DTraits >::constPtrType

Definition at line 461 of file PtrTypes.h.

Constructor & Destructor Documentation

◆ RWCOW_pointer() [1/4]

template<class D, class DTraits = rw_pointer::Shared<D>>
zypp::RWCOW_pointer< D, DTraits >::RWCOW_pointer ( )
inline

Definition at line 463 of file PtrTypes.h.

◆ RWCOW_pointer() [2/4]

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

Definition at line 466 of file PtrTypes.h.

◆ RWCOW_pointer() [3/4]

template<class D, class DTraits = rw_pointer::Shared<D>>
zypp::RWCOW_pointer< D, DTraits >::RWCOW_pointer ( typename PtrType::element_type *  dptr)
inlineexplicit

Definition at line 470 of file PtrTypes.h.

◆ RWCOW_pointer() [4/4]

template<class D, class DTraits = rw_pointer::Shared<D>>
zypp::RWCOW_pointer< D, DTraits >::RWCOW_pointer ( PtrType  dptr)
inlineexplicit

Definition at line 475 of file PtrTypes.h.

Member Function Documentation

◆ operator=()

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

Definition at line 479 of file PtrTypes.h.

◆ reset() [1/2]

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

Definition at line 482 of file PtrTypes.h.

◆ reset() [2/2]

template<class D, class DTraits = rw_pointer::Shared<D>>
void zypp::RWCOW_pointer< D, DTraits >::reset ( typename PtrType::element_type *  dptr)
inline

Definition at line 485 of file PtrTypes.h.

◆ swap() [1/2]

template<class D, class DTraits = rw_pointer::Shared<D>>
void zypp::RWCOW_pointer< D, DTraits >::swap ( RWCOW_pointer< D, DTraits > &  rhs)
inline

Definition at line 488 of file PtrTypes.h.

◆ swap() [2/2]

template<class D, class DTraits = rw_pointer::Shared<D>>
void zypp::RWCOW_pointer< D, DTraits >::swap ( PtrType rhs)
inline

Definition at line 491 of file PtrTypes.h.

◆ operator bool()

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

Definition at line 494 of file PtrTypes.h.

◆ operator*() [1/2]

template<class D, class DTraits = rw_pointer::Shared<D>>
const D& zypp::RWCOW_pointer< D, DTraits >::operator* ( ) const
inline

Definition at line 497 of file PtrTypes.h.

◆ operator->() [1/2]

template<class D, class DTraits = rw_pointer::Shared<D>>
const D* zypp::RWCOW_pointer< D, DTraits >::operator-> ( ) const
inline

Definition at line 500 of file PtrTypes.h.

◆ get() [1/2]

template<class D, class DTraits = rw_pointer::Shared<D>>
const D* zypp::RWCOW_pointer< D, DTraits >::get ( ) const
inline

Definition at line 503 of file PtrTypes.h.

◆ operator*() [2/2]

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

Definition at line 506 of file PtrTypes.h.

◆ operator->() [2/2]

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

Definition at line 509 of file PtrTypes.h.

◆ get() [2/2]

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

Definition at line 512 of file PtrTypes.h.

◆ unique()

template<class D, class DTraits = rw_pointer::Shared<D>>
bool zypp::RWCOW_pointer< D, DTraits >::unique ( ) const
inline

Definition at line 516 of file PtrTypes.h.

◆ use_count()

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

Definition at line 519 of file PtrTypes.h.

◆ getPtr() [1/2]

template<class D, class DTraits = rw_pointer::Shared<D>>
constPtrType zypp::RWCOW_pointer< D, DTraits >::getPtr ( ) const
inline

Definition at line 522 of file PtrTypes.h.

◆ getPtr() [2/2]

template<class D, class DTraits = rw_pointer::Shared<D>>
PtrType zypp::RWCOW_pointer< D, DTraits >::getPtr ( )
inline

Definition at line 525 of file PtrTypes.h.

◆ cgetPtr()

template<class D, class DTraits = rw_pointer::Shared<D>>
constPtrType zypp::RWCOW_pointer< D, DTraits >::cgetPtr ( )
inline

Definition at line 528 of file PtrTypes.h.

◆ assertUnshared()

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

Definition at line 533 of file PtrTypes.h.

Friends And Related Function Documentation

◆ rwcowClone()

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.

◆ operator<<()

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.

◆ operator==() [1/7]

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.

◆ operator==() [2/7]

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.

◆ operator==() [3/7]

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.

◆ operator==() [4/7]

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.

◆ operator==() [5/7]

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.

◆ operator==() [6/7]

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.

◆ operator==() [7/7]

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.

◆ operator!=() [1/7]

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.

◆ operator!=() [2/7]

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.

◆ operator!=() [3/7]

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.

◆ operator!=() [4/7]

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.

◆ operator!=() [5/7]

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.

◆ operator!=() [6/7]

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.

◆ operator!=() [7/7]

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.

Member Data Documentation

◆ _dptr

template<class D, class DTraits = rw_pointer::Shared<D>>
PtrType zypp::RWCOW_pointer< D, DTraits >::_dptr
private

Definition at line 540 of file PtrTypes.h.


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