iceoryx_doc  1.0.1
Public Types | Public Member Functions | Friends | List of all members
iox::mepoo::SharedPointer< T > Class Template Reference

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>

Inheritance diagram for iox::mepoo::SharedPointer< T >:
Inheritance graph
[legend]
Collaboration diagram for iox::mepoo::SharedPointer< T >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 SharedPointer (const SharedPointer &)=default
 
 SharedPointer (SharedPointer &&)=default
 
SharedPointeroperator= (const SharedPointer &) noexcept
 
SharedPointeroperator= (SharedPointer &&) noexcept
 
T * get () noexcept
 
const T * get () const noexcept
 
T * operator-> () noexcept
 
const T * operator-> () const noexcept
 
T & operator* () noexcept
 
const T & operator* () const noexcept
 
 operator bool () const noexcept
 

Friends

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

Detailed Description

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

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 {
// ...
}

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