Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::state::StateTree::SyncedClone Class Reference

Owns the listener wiring created by StateTree::clone_synced(). More...

#include <state_tree.hpp>

Public Member Functions

 SyncedClone (SyncedClone &&) noexcept
SyncedClone & operator= (SyncedClone &&) noexcept
 SyncedClone (const SyncedClone &)=delete
SyncedClone & operator= (const SyncedClone &)=delete
 ~SyncedClone ()
const StateTree::Ptr & clone () const
 The cloned tree.
void detach ()
 Drop the listener subscriptions early.
bool is_attached () const
 Whether the subscription is still active.

Friends

class StateTree

Detailed Description

Owns the listener wiring created by StateTree::clone_synced().

One instance per clone; destroy to detach.

Move-only: copying would silently double up listener registrations.

Constructor & Destructor Documentation

◆ SyncedClone() [1/2]

pulp::state::StateTree::SyncedClone::SyncedClone ( SyncedClone && )
noexcept

◆ SyncedClone() [2/2]

pulp::state::StateTree::SyncedClone::SyncedClone ( const SyncedClone & )
delete

◆ ~SyncedClone()

pulp::state::StateTree::SyncedClone::~SyncedClone ( )

Member Function Documentation

◆ clone()

const StateTree::Ptr & pulp::state::StateTree::SyncedClone::clone ( ) const
inline

The cloned tree.

Mutate the ORIGINAL (the tree passed to clone_synced) to drive changes; this handle observes them.

◆ detach()

void pulp::state::StateTree::SyncedClone::detach ( )

Drop the listener subscriptions early.

After this returns the clone stops mirroring further mutations. Safe to call twice.

◆ is_attached()

bool pulp::state::StateTree::SyncedClone::is_attached ( ) const
inline

Whether the subscription is still active.

◆ operator=() [1/2]

SyncedClone & pulp::state::StateTree::SyncedClone::operator= ( const SyncedClone & )
delete

◆ operator=() [2/2]

SyncedClone & pulp::state::StateTree::SyncedClone::operator= ( SyncedClone && )
noexcept

◆ StateTree

friend class StateTree
friend

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/state/include/pulp/state/state_tree.hpp