HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Data Fields
v1::detail::observable_impl< T > Struct Template Reference

#include <hikogui/observable.hpp>

Data Structures

struct  const_proxy_type
 
struct  proxy_type
 

Public Types

using value_type = T
 
using owner_type = observable<value_type>
 

Public Member Functions

 observable_impl (observable_impl const &)=delete
 
 observable_impl (observable_impl &&)=delete
 
observable_imploperator= (observable_impl const &)=delete
 
observable_imploperator= (observable_impl &&)=delete
 
 observable_impl (std::convertible_to< value_type > auto &&value) noexcept
 
proxy_type proxy () noexcept
 
const_proxy_type const_proxy () noexcept
 
void notify_owners () const noexcept
 
void add_owner (owner_type &owner) noexcept
 Add an observer as one of the owners of the shared-value.
 
void remove_owner (owner_type &owner) noexcept
 Remove an observer as one of the owners of the shared-value.
 
void reseat_owners (std::shared_ptr< observable_impl > const &new_impl) noexcept
 

Data Fields

value_type value
 
std::vector< owner_type * > owners
 
size_t ro_count = 0
 
bool rw_count = false
 

Detailed Description

template<typename T>
struct v1::detail::observable_impl< T >

The shared value, shared between observers.

Member Function Documentation

◆ add_owner()

template<typename T >
void v1::detail::observable_impl< T >::add_owner ( owner_type & owner)
inlinenoexcept

Add an observer as one of the owners of the shared-value.

Parameters
ownerA reference to observer

◆ remove_owner()

template<typename T >
void v1::detail::observable_impl< T >::remove_owner ( owner_type & owner)
inlinenoexcept

Remove an observer as one of the owners of the shared-value.

Parameters
ownerA reference to observer

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