psychic-ui 0.0.0
Loading...
Searching...
No Matches
psychic_ui::detail::SignalCore< T > Struct Template Reference

#include <Slot.hpp>

Public Member Functions

void compact ()

Public Attributes

std::vector< std::shared_ptr< Slot< T... > > > slots {}
unsigned int emitting {0}
bool dirty {false}

Detailed Description

template<class... T>
struct psychic_ui::detail::SignalCore< T >

What a Signal shares with its slots and with its running emissions. Slots only hold a weak_ptr to it, so disconnecting after the signal died is a no-op. An emission holds a shared_ptr to it, so the slots it iterates outlive a handler that destroys the signal.

Member Function Documentation

◆ compact()

template<class... T>
void psychic_ui::detail::SignalCore< T >::compact ( )
inline

Drop the disconnected slots, unless an emission is iterating over them.


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