Skip to content

iox::mepoo::SharedPointer🔗

DesignPattern::Creation offers us a create method which forwards the arguments to the constructor. Use this class like in the code example below. More...

#include <shared_pointer.hpp>

Public Types🔗

Name
using DesignPattern::Creation< SharedPointer< T >, SharedPointerError > CreationPattern_t

Public Functions🔗

Name
SharedPointer() =default
SharedPointer(const SharedPointer & ) =default
SharedPointer(SharedPointer && ) =default
~SharedPointer()
SharedPointer & operator=(const SharedPointer & rhs)
SharedPointer & operator=(SharedPointer && rhs)
T * get()
const T * get() const
T * operator->()
const T * operator->() const
T & operator*()
const T & operator*() const
operator bool() const

Friends🔗

Name
class DesignPattern::Creation< SharedPointer< T >, SharedPointerError >

Detailed Description🔗

template <typename T >
class iox::mepoo::SharedPointer;

DesignPattern::Creation offers us a create method which forwards the arguments to the constructor. Use this class like in the code example below.

// cxx::expected
auto sharedPointer = SharedPointer<int>::Create(mySharedChunk, 123);
if ( sharedPointer.has_error() ) {
    // ...
} else {
    // ...
}

Public Types Documentation🔗

using CreationPattern_t🔗

using iox::mepoo::SharedPointer< T >::CreationPattern_t =  DesignPattern::Creation<SharedPointer<T>, SharedPointerError>;

Public Functions Documentation🔗

function SharedPointer🔗

SharedPointer() =default

function SharedPointer🔗

SharedPointer(
    const SharedPointer & 
) =default

function SharedPointer🔗

SharedPointer(
    SharedPointer && 
) =default

function ~SharedPointer🔗

inline ~SharedPointer()

function operator=🔗

inline SharedPointer & operator=(
    const SharedPointer & rhs
)

function operator=🔗

inline SharedPointer & operator=(
    SharedPointer && rhs
)

function get🔗

inline T * get()

function get🔗

const T * get() const

function operator->🔗

inline T * operator->()

function operator->🔗

const T * operator->() const

function operator*🔗

inline T & operator*()

function operator*🔗

const T & operator*() const

function operator bool🔗

inline explicit operator bool() const

Friends🔗

friend DesignPattern::Creation< SharedPointer< T >, SharedPointerError >🔗

friend class DesignPattern::Creation< SharedPointer< T >, SharedPointerError >;

Updated on 17 June 2021 at 11:15:27 CEST