SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::utils::dependencies::Observers< Registrations > Class Template Reference

Own registrations; execution state lasts for one invocation and is never part of the numerical cache. More...

#include <observers.hpp>

Public Member Functions

 Observers (Registrations... observers)
 Copy or move callbacks into this bundle without running them.
 
template<typename KeyT, std::size_t Position = 0, typename FunctionT>
auto evaluate (FunctionT &&function)
 Nest matching node hooks so before runs in registration order and after in reverse order.
 
template<typename InputT, typename ConsumerT, typename ValueT>
void edge (const ValueT &value)
 The cache visits inputs in declaration order; each edge's callbacks follow registration order.
 

Private Attributes

std::tuple< Registrations... > m_observers
 

Detailed Description

template<typename... Registrations>
requires (detail::is_observer_v<Registrations> && ...)
class serif::utils::dependencies::Observers< Registrations >

Own registrations; execution state lasts for one invocation and is never part of the numerical cache.

Constructor & Destructor Documentation

◆ Observers()

template<typename... Registrations>
serif::utils::dependencies::Observers< Registrations >::Observers ( Registrations... observers)
inlineexplicit

Copy or move callbacks into this bundle without running them.

Member Function Documentation

◆ edge()

template<typename... Registrations>
template<typename InputT, typename ConsumerT, typename ValueT>
void serif::utils::dependencies::Observers< Registrations >::edge ( const ValueT & value)
inline

The cache visits inputs in declaration order; each edge's callbacks follow registration order.

◆ evaluate()

template<typename... Registrations>
template<typename KeyT, std::size_t Position = 0, typename FunctionT>
auto serif::utils::dependencies::Observers< Registrations >::evaluate ( FunctionT && function)
inlinenodiscard

Nest matching node hooks so before runs in registration order and after in reverse order.

Member Data Documentation

◆ m_observers

template<typename... Registrations>
std::tuple<Registrations...> serif::utils::dependencies::Observers< Registrations >::m_observers
private

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