Like Reciprocal_ptr
, put it can be connected with multiple partners.
More...
#include <reciprocal.hpp>
Public Member Functions | |
Reciprocal_list (T *data) | |
Constructs a Reciprocal_list and sets its mine to data (which can be null). | |
void | add (mutual::Base< U, T > &that) |
Reciprocally connects this with that . | |
void | clear () |
disconnects all partners | |
void | remove (mutual::Base< U, T > &that) |
Reciprocally disconnects this from that . | |
next::Sequence< U * > | theirs () |
Obtains all of this 's partners' mine s as a next::Sequence | |
next::Sequence< const U * > | theirs () const |
Obtains all of this 's partners' mine s as a next::Sequence | |
![]() | |
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 | |
Mortal_ptr< T > | mine |
The object that this is a proxy for in reciprocal connections. | |
![]() | |
std::vector< Base< U, T > * > | _partners |
Additional Inherited Members | |
![]() | |
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. | |
Like Reciprocal_ptr
, put it can be connected with multiple partners.
Reciprocal_list
s can be connected with other Reciprocal_list
s or with Reciprocal_ptr
s. Of course, in both cases connections are reciprocated.
|
inline |
Reciprocally connects this
with that
.
In other words, adds that
to this
's list of partners.
|
inline |
Reciprocally disconnects this
from that
.
In other words, removes that
from this
's list of partners.
Mortal_ptr<T> hexed::Reciprocal_list< T, U >::mine |
The object that this
is a proxy for in reciprocal connections.
Reciprocal_ptr::mine