xentara-plugin v1.2.1
The Xentara Plugin Framework
|
A mixin class that enables getting a shared pointer from the this pointer. More...
#include <plugin/EnableSharedFromThis.hpp>
Public Member Functions | |
constexpr | EnableSharedFromThis () noexcept=default |
Default constructor. | |
EnableSharedFromThis (const EnableSharedFromThis &) noexcept | |
Dummy copy constructor that does not copy anything. | |
auto | operator= (const EnableSharedFromThis &) noexcept -> EnableSharedFromThis & |
Dummy assignment operator that does nothing. | |
auto | sharedFromThis () -> std::shared_ptr< Element > |
Creates a shared pointer for this object. | |
auto | sharedFromThis () const -> std::shared_ptr< const Element > |
Creates a constant shared pointer for this object. | |
auto | weakFromThis () -> std::weak_ptr< Element > |
Creates a weak pointer for this object. | |
auto | weakFromThis () const -> std::weak_ptr< const Element > |
Creates a constant weak pointer for this object. | |
A mixin class that enables getting a shared pointer from the this pointer.
This class is similar to std::enable_shared_from_this, except that it is designed especially for Xentara plugin elements. It works together with xentara::plugin::SharedFactory in the same way as std::enable_shared_from_this workes together with std::make_shared().
|
constexprdefaultnoexcept |
Default constructor.
|
noexcept |
Dummy copy constructor that does not copy anything.
|
noexcept |
Dummy assignment operator that does nothing.
auto xentara::plugin::EnableSharedFromThis< Element >::sharedFromThis | ( | ) | -> std::shared_ptr<Element> |
Creates a shared pointer for this object.
auto xentara::plugin::EnableSharedFromThis< Element >::sharedFromThis | ( | ) | const -> std::shared_ptr<const Element> |
Creates a constant shared pointer for this object.
auto xentara::plugin::EnableSharedFromThis< Element >::weakFromThis | ( | ) | -> std::weak_ptr<Element> |
Creates a weak pointer for this object.
auto xentara::plugin::EnableSharedFromThis< Element >::weakFromThis | ( | ) | const -> std::weak_ptr<const Element> |
Creates a constant weak pointer for this object.