HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields
tt::detail::observable_notifier_type Struct Reference

Public Types

using callback_ptr_type = std::weak_ptr<std::function<void()>>
 

Public Member Functions

 observable_notifier_type (observable_notifier_type const &)=delete
 
 observable_notifier_type (observable_notifier_type &&)=delete
 
observable_notifier_typeoperator= (observable_notifier_type const &)=delete
 
observable_notifier_typeoperator= (observable_notifier_type &&)=delete
 
void start_proxy () noexcept
 
void finish_proxy () noexcept
 
void push (callback_ptr_type callback_ptr) noexcept
 Add a callback to the list.
 
void notify () noexcept
 Notify all callbacks that have been pushed.
 

Data Fields

uint64_t proxy_count = 0
 
std::vector< callback_ptr_typecallbacks
 

Member Function Documentation

◆ notify()

void tt::detail::observable_notifier_type::notify ( )
inlinenoexcept

Notify all callbacks that have been pushed.

Precondition
observable_mutex must be locked.
Postcondition
obervable_mutex is unlocked
All registered callbacks have been called.
List of registered callbacks has been cleared.

◆ push()

void tt::detail::observable_notifier_type::push ( callback_ptr_type callback_ptr)
inlinenoexcept

Add a callback to the list.

Precondition
observable_mutex must be locked.

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