|
Scroom 0.14-49-gb7ae7a6d
|
#include <utilities.hh>


Public Member Functions | |
| Base ()=default | |
| Base (const Base &)=delete | |
| Base (Base &&)=delete | |
| Base & | operator= (const Base &)=delete |
| Base & | operator= (Base &&)=delete |
| virtual | ~Base ()=default |
| template<typename R > | |
| std::shared_ptr< R > | shared_from_this () |
| template<typename R > | |
| std::shared_ptr< R const > | shared_from_this () const |
Base class that inherits from std::enable_shared_from_this.
In an inheritance hierarchy, you can inherit from std::enable_shared_from_this only once. Otherwise, you'll get two copies of the internal weak pointer, and only one gets initialized.
To work with this restriction, this class inherits from std::enable_shared_from_this, and provides methods to dynamic_cast to whatever subtype you like.
You should always inherit virtually from this class, to ensure that even in the face of multiple inheritance, there always is only one copy of Base.
|
default |
|
delete |
|
delete |
|
virtualdefault |
|
inline |
Calls shared_from_this() with a built-in dynamic cast, to make it usable in subclasses.
Referenced by on_view_destroyed().

|
inline |
Calls shared_from_this() with a built-in dynamic cast, to make it usable in subclasses.