Thrill  0.1
ByteBlockPtr Class Reference

Detailed Description

A non-pinned counting pointer to a ByteBlock.

Definition at line 176 of file byte_block.hpp.

+ Inheritance diagram for ByteBlockPtr:
+ Collaboration diagram for ByteBlockPtr:

#include <byte_block.hpp>

Public Member Functions

 ByteBlockPtr ()=default
 default ctor: returns an empty ByteBlockPtr More...
 
- Public Member Functions inherited from CountingPtr< Type, Deleter >
 CountingPtr () noexcept
 default constructor: contains a nullptr pointer. More...
 
 CountingPtr (std::nullptr_t) noexcept
 implicit conversion from nullptr_t: contains a nullptr pointer. More...
 
 CountingPtr (Type *ptr) noexcept
 constructor from pointer: initializes new reference to ptr. More...
 
 CountingPtr (const CountingPtr &other) noexcept
 copy-constructor: also initializes new reference to ptr. More...
 
template<typename Subclass , typename = typename std::enable_if< std::is_convertible<Subclass*, Type*>::value, void>::type>
 CountingPtr (const CountingPtr< Subclass, Deleter > &other) noexcept
 copy-constructor: also initializes new reference to ptr. More...
 
 CountingPtr (CountingPtr &&other) noexcept
 move-constructor: just moves pointer, does not change reference counts. More...
 
template<typename Subclass , typename = typename std::enable_if< std::is_convertible<Subclass*, Type*>::value, void>::type>
 CountingPtr (CountingPtr< Subclass, Deleter > &&other) noexcept
 move-constructor: just moves pointer, does not change reference counts. More...
 
CountingPtroperator= (const CountingPtr &other) noexcept
 
template<typename Subclass , typename = typename std::enable_if< std::is_convertible<Subclass*, Type*>::value, void>::type>
CountingPtroperator= (const CountingPtr< Subclass, Deleter > &other) noexcept
 
CountingPtroperator= (CountingPtr &&other) noexcept
 move-assignment operator: move reference of other to current object. More...
 
template<typename Subclass , typename = typename std::enable_if< std::is_convertible<Subclass*, Type*>::value, void>::type>
CountingPtroperator= (CountingPtr< Subclass, Deleter > &&other) noexcept
 move-assignment operator: move reference of other to current object. More...
 
 ~CountingPtr ()
 destructor: decrements reference count in ptr. More...
 
Type & operator* () const noexcept
 return the enclosed object as reference. More...
 
Type * operator-> () const noexcept
 return the enclosed pointer. More...
 
Type * get () const noexcept
 return the enclosed pointer. More...
 
bool valid () const noexcept
 test for a non-nullptr pointer More...
 
 operator bool () const noexcept
 cast to bool checks for a nullptr pointer More...
 
bool empty () const noexcept
 test for a nullptr pointer More...
 
bool unique () const noexcept
 if the object is referred by this CountingPtr only More...
 
size_t use_count () const noexcept
 
void reset ()
 release contained pointer, frees object if this is the last reference. More...
 
void swap (CountingPtr &b) noexcept
 
void unify ()
 make and refer a copy if the original object was shared. More...
 
bool operator== (const CountingPtr &other) const noexcept
 test equality of only the pointer values. More...
 
bool operator!= (const CountingPtr &other) const noexcept
 test inequality of only the pointer values. More...
 
bool operator== (Type *other) const noexcept
 test equality of only the address pointed to More...
 
bool operator!= (Type *other) const noexcept
 test inequality of only the address pointed to More...
 
bool operator< (const CountingPtr &other) const noexcept
 compare the pointer values. More...
 
bool operator<= (const CountingPtr &other) const noexcept
 compare the pointer values. More...
 
bool operator> (const CountingPtr &other) const noexcept
 compare the pointer values. More...
 
bool operator>= (const CountingPtr &other) const noexcept
 compare the pointer values. More...
 
bool operator< (Type *other) const noexcept
 compare the pointer values. More...
 
bool operator<= (Type *other) const noexcept
 compare the pointer values. More...
 
bool operator> (Type *other) const noexcept
 compare the pointer values. More...
 
bool operator>= (Type *other) const noexcept
 compare the pointer values. More...
 

Protected Member Functions

 ByteBlockPtr (const PinnedByteBlockPtr &p)
 (protected) ctor from PinnedByteBlockPtr More...
 
 ByteBlockPtr (PinnedByteBlockPtr &&p)
 (protected) ctor from PinnedByteBlockPtr More...
 
 ByteBlockPtr (ByteBlock *ptr)
 (protected) ctor from plain pointer More...
 

Private Types

using Super = ByteBlock::ByteBlockPtr
 

Additional Inherited Members

- Public Types inherited from CountingPtr< Type, Deleter >
using element_type = Type
 contained type. More...
 

Member Typedef Documentation

◆ Super

using Super = ByteBlock::ByteBlockPtr
private

Definition at line 178 of file byte_block.hpp.

Constructor & Destructor Documentation

◆ ByteBlockPtr() [1/2]

ByteBlockPtr ( )
default

default ctor: returns an empty ByteBlockPtr

◆ ByteBlockPtr() [2/2]

ByteBlockPtr ( ByteBlock ptr)
inlineprotected

(protected) ctor from plain pointer

Definition at line 190 of file byte_block.hpp.


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