an object which is mutually connected ("paired") with only one other object More...
#include <mutual.hpp>
Public Member Functions | |
| Single () | |
Constructs a Single with no partner (it is "unpaired") | |
| Single (const Single &)=delete | |
| Single (Single &&that) | |
steals that's partner, if it has one, leaving that unpaired | |
| Single & | operator= (const Single &)=delete |
| Single & | operator= (Single &&that) |
disconnects this from its partner, if it has one, and steals that's, if it has one | |
| void | pair (Base< U, T > &that) |
mutually connects this with that | |
| void | unpair () |
mutually disconnects this from that | |
| bool | paired () const |
returns true iff this is currently paired with a partner | |
| Base< U, T > * | partner () |
provides access to this's partner | |
| const Base< U, T > * | partner () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Public Member Functions inherited from hexed::mutual::Base< T, U > | |
| virtual T * | _mine () |
| virtual const T * | _mine () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Additional Inherited Members | |
Protected Member Functions inherited from hexed::mutual::Base< T, U > | |
| void | _connect (Base< U, T > &that) |
may be overridden by derived classes to provide partners to data of some arbitrary type T | |
| void | _disconnect (Base< U, T > &that) |
mutually disconnects this and that by calling both of their _unset() member functions | |
Static Protected Member Functions inherited from hexed::mutual::Base< T, U > | |
| static U * | _yours (Base< U, T > &that) |
Accesses the _mine() of that | |
| static const U * | _yours (const Base< U, T > &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< T, U > | |
| Lock | _lock |
an object which is mutually connected ("paired") with only one other object
|
inline |
disconnects this from its partner, if it has one, and steals that's, if it has one
leaves that unpaired