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. | |
Additional Inherited Members | |
![]() | |
virtual T * | _mine () |
may be overridden by derrived classes to provide partners to data of some arbitrary type T | |
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. | |
void | _connect (Base< U, T > &that) |
mutually connects this and that by calling both of their _set() member functions | |
void | _disconnect (Base< U, T > &that) |
mutually disconnects this and that by calling both of their _unset() member functions | |
![]() | |
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. | |
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