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' mines as a next::Sequence | |
| next::Sequence< const U * > | theirs () const |
Obtains all of this's partners' mines as a next::Sequence | |
Public Member Functions inherited from hexed::mutual::Multiple< T, U > | |
| 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. | |
Public Attributes inherited from hexed::mutual::Multiple< T, U > | |
| std::vector< Base< U, T > * > | _partners |
Additional Inherited Members | |
Protected Member Functions inherited from hexed::mutual::Base< T, U > | |
| 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 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. | |
Like Reciprocal_ptr, put it can be connected with multiple partners.
Reciprocal_lists can be connected with other Reciprocal_lists or with Reciprocal_ptrs. 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