represents an object that could die at any moment More...
#include <Mortal.hpp>
Additional Inherited Members | |
![]() | |
Multiple (const Multiple &)=delete | |
Multiple (Multiple &&that) | |
steals all of that 's partners, leaving that unconnected | |
Multiple & | operator= (const Multiple &)=delete |
Multiple & | operator= (Multiple &&that) |
steals all of that 's partners, leaving that unconnected | |
next::Sequence< Base< void, void > & > | partners () |
provides access to the list of partners | |
next::Sequence< const Base< void, void > & > | partners () const |
provides access to the list of partners | |
![]() | |
std::vector< Base< void, void > * > | _partners |
![]() | |
virtual void * | _mine () |
may be overridden by derrived classes to provide partners to data of some arbitrary type T | |
virtual const void * | _mine () const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | _connect (Base< void, void > &that) |
mutually connects this and that by calling both of their _set() member functions | |
void | _disconnect (Base< void, void > &that) |
mutually disconnects this and that by calling both of their _unset() member functions | |
![]() | |
static void * | _yours (Base< void, void > &that) |
Accesses the _mine() of that | |
static const void * | _yours (const Base< void, void > &that) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
represents an object that could die at any moment
As described in the documentation for the mutual
namespace, sometimes it is useful to have pointers to an object, where when that object is destroyed or moved the pointers are updated. You can obtain this by deriving a class from Mortal
and creating Mortal_ptr
s to it.
Mortal
to an object of a different type. This is undefined behavior. For example, the following is illegal: However, the following is OK: