libzypp 17.37.17
|
RW_pointer supporting 'copy on write' functionality. More...
#include <zypp-core/base/PtrTypes.h>
Public Types | |
using | PtrType = typename DTraits::PtrType |
using | constPtrType = typename DTraits::constPtrType |
Public Member Functions | |
RWCOW_pointer () | |
RWCOW_pointer (std::nullptr_t) | |
RWCOW_pointer (const RWCOW_pointer &)=default | |
RWCOW_pointer (RWCOW_pointer &&)=default | |
RWCOW_pointer (typename PtrType::element_type *dptr) | |
RWCOW_pointer (PtrType dptr) | |
RWCOW_pointer & | operator= (std::nullptr_t) |
RWCOW_pointer & | operator= (const RWCOW_pointer &)=default |
RWCOW_pointer & | operator= (RWCOW_pointer &&)=default |
void | reset () |
void | reset (typename PtrType::element_type *dptr) |
void | swap (RWCOW_pointer &rhs) noexcept |
void | swap (PtrType &rhs) noexcept |
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 Symbols | |
(Note that these are not member symbols.) | |
template<class D> | |
D * | rwcowClone (const D *rhs) |
Clone the underlying object. | |
template<class D, class DPtr> | |
std::ostream & | operator<< (std::ostream &str, const RWCOW_pointer< D, DPtr > &obj) |
Stream output. | |
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) |
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 468 of file PtrTypes.h.
using zypp::RWCOW_pointer< D, DTraits >::PtrType = typename DTraits::PtrType |
Definition at line 470 of file PtrTypes.h.
using zypp::RWCOW_pointer< D, DTraits >::constPtrType = typename DTraits::constPtrType |
Definition at line 471 of file PtrTypes.h.
|
inline |
Definition at line 473 of file PtrTypes.h.
|
inline |
Definition at line 475 of file PtrTypes.h.
|
default |
|
default |
|
inlineexplicit |
Definition at line 482 of file PtrTypes.h.
|
inlineexplicit |
Definition at line 487 of file PtrTypes.h.
|
inline |
Definition at line 491 of file PtrTypes.h.
|
default |
|
default |
|
inline |
Definition at line 498 of file PtrTypes.h.
|
inline |
Definition at line 501 of file PtrTypes.h.
|
inlinenoexcept |
Definition at line 504 of file PtrTypes.h.
|
inlinenoexcept |
Definition at line 507 of file PtrTypes.h.
|
inlineexplicit |
Definition at line 510 of file PtrTypes.h.
|
inline |
Definition at line 513 of file PtrTypes.h.
|
inline |
Definition at line 516 of file PtrTypes.h.
|
inline |
Definition at line 519 of file PtrTypes.h.
|
inline |
Definition at line 522 of file PtrTypes.h.
|
inline |
Definition at line 525 of file PtrTypes.h.
|
inline |
Definition at line 528 of file PtrTypes.h.
|
inline |
Definition at line 532 of file PtrTypes.h.
|
inline |
Definition at line 535 of file PtrTypes.h.
|
inline |
Definition at line 538 of file PtrTypes.h.
|
inline |
Definition at line 541 of file PtrTypes.h.
|
inline |
Definition at line 544 of file PtrTypes.h.
|
inlineprivate |
Definition at line 549 of file PtrTypes.h.
|
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 453 of file PtrTypes.h.
|
Stream output.
Print the D
object the RWCOW_pointer refers, or "NULL"
if the pointer is NULL
.
Definition at line 566 of file PtrTypes.h.
|
Definition at line 575 of file PtrTypes.h.
|
Definition at line 579 of file PtrTypes.h.
|
Definition at line 583 of file PtrTypes.h.
|
Definition at line 587 of file PtrTypes.h.
|
Definition at line 591 of file PtrTypes.h.
|
Definition at line 595 of file PtrTypes.h.
|
Definition at line 599 of file PtrTypes.h.
|
Definition at line 604 of file PtrTypes.h.
|
Definition at line 608 of file PtrTypes.h.
|
Definition at line 612 of file PtrTypes.h.
|
Definition at line 616 of file PtrTypes.h.
|
Definition at line 620 of file PtrTypes.h.
|
Definition at line 624 of file PtrTypes.h.
|
Definition at line 628 of file PtrTypes.h.
|
private |
Definition at line 556 of file PtrTypes.h.