Wayverb
wayverb::combined::model::persistent_connection< Item > Class Template Referencefinal

Public Types

using scoped_connection = typename Item::scoped_connection
 
using item_t = Item
 

Public Member Functions

template<typename Owner >
 persistent_connection (Owner &owner)
 Assumption: owner will always outlive the connection. More...
 
template<typename Owner >
 persistent_connection (Owner &owner, const item_t &i)
 
 persistent_connection (const persistent_connection &)=delete
 
 persistent_connection (persistent_connection &&) noexcept=default
 
persistent_connectionoperator= (const persistent_connection &)=delete
 
persistent_connectionoperator= (persistent_connection &&) noexcept=default
 
const std::shared_ptr< item_t > & item () const
 
auto get () const
 
auto operator-> () const
 
auto & operator* () const
 
void block ()
 
void unblock ()
 

Constructor & Destructor Documentation

template<typename Item>
template<typename Owner >
wayverb::combined::model::persistent_connection< Item >::persistent_connection ( Owner &  owner)
inlineexplicit

Assumption: owner will always outlive the connection.

Construction: item is constructed, and connected to supplied owner. Copy construction: disabled. Move construction: item & connection are moved, owner ref is unchanged. Copy assignment: disabled. Move assignment: item & connection are moved, owner ref is unchanged. Destruction: item ref count is decreased, connection to owner is severed.

Member Function Documentation

template<typename Item>
const std::shared_ptr<item_t>& wayverb::combined::model::persistent_connection< Item >::item ( ) const
inline

Can't modify the shared ptr itself, but modifications to pointed-to object is fine. If the pointed-to object is assigned-to, it will retain its listeners from before the assignment, so this object's invariants will not be violated.


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