an object that can be mutually connected with any number of partners More...
#include <mutual.hpp>
Public Member Functions | |
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< U, T > & > | partners () |
provides access to the list of partners | |
next::Sequence< const Base< U, T > & > | partners () const |
provides access to the list of partners | |
Public Attributes | |
std::vector< Base< U, T > * > | _partners |
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 that can be mutually connected with any number of partners
This class does not provide any interface for connecting to and disconnecting from partners. It is intended that you either connect Single
's to it, or create a derrived class which provides an interface to connect and disconnect (by calling Base::_connect
and Base::_disconnect
). It does, however, take care of destruction and move semantics, so derrived classes shouldn't have to worry about that.
|
inline |
steals all of that
's partners, leaving that
unconnected
this
is first disconnected from all its own partners