hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::mutual::Multiple< T, U > Class Template Reference

an object that can be mutually connected with any number of partners More...

#include <mutual.hpp>

Inheritance diagram for hexed::mutual::Multiple< T, U >:
hexed::mutual::Base< T, U > hexed::Reciprocal_list< T, U >

Public Member Functions

 Multiple (const Multiple &)=delete
 
 Multiple (Multiple &&that)
 steals all of that's partners, leaving that unconnected
 
Multipleoperator= (const Multiple &)=delete
 
Multipleoperator= (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

- Protected Member Functions inherited from hexed::mutual::Base< T, U >
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 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.
 

Detailed Description

template<typename T, typename U>
class hexed::mutual::Multiple< T, U >

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.

Member Function Documentation

◆ operator=()

template<typename T , typename U >
Multiple & hexed::mutual::Multiple< T, U >::operator= ( Multiple< T, U > && that)
inline

steals all of that's partners, leaving that unconnected

this is first disconnected from all its own partners


The documentation for this class was generated from the following file: