hexed 0.4.0
 
Loading...
Searching...
No Matches
hexed::Mortal Class Reference

represents an object that could die at any moment More...

#include <Mortal.hpp>

Inheritance diagram for hexed::Mortal:
hexed::mutual::Multiple< void, void > hexed::mutual::Base< void, void > hexed::Boundary_connection hexed::Element hexed::Face hexed::Face_refinement hexed::Neighbor_connection hexed::Tree hexed::next::Block hexed::Deformed_element hexed::next::Boundary_block hexed::next::Element_shape hexed::next::Vertex hexed::next::Edge hexed::next::Surface_face

Additional Inherited Members

- Public Member Functions inherited from hexed::mutual::Multiple< void, void >
 Multiple (const Multiple &)=delete
 
 Multiple (Multiple &&that)
 steals all of that's partners, leaving that unconnected
 
Multipleoperator= (const Multiple &)=delete
 
Multipleoperator= (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
 
- Public Member Functions inherited from hexed::mutual::Base< void, void >
virtual void * _mine ()
 
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.
 
- Protected Member Functions inherited from hexed::mutual::Base< void, void >
void _connect (Base< void, void > &that)
 may be overridden by derived classes to provide partners to data of some arbitrary type T
 
void _disconnect (Base< void, void > &that)
 mutually disconnects this and that by calling both of their _unset() member functions
 
- Static Protected Member Functions inherited from hexed::mutual::Base< void, void >
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.
 
- Protected Attributes inherited from hexed::mutual::Base< void, void >
Lock _lock
 

Detailed Description

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_ptrs to it.

Warning
You may not move any object derived from Mortal to an object of a different type. This is undefined behavior. For example, the following is illegal:
class Derived : hexed::Mortal {};
Derived d;
Mortal m(std::move(d));
represents an object that could die at any moment
Definition Mortal.hpp:31
However, the following is OK:
class Derived : hexed::Mortal {};
Derived d;
Derived d1(std::move(d));

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