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

#include <snapshot.hpp>

Public Member Functions

 ProjectedSnapshot (FunctionT function)
 Own the policy callable so its configuration travels with the source.
 
template<typename T>
requires std::invocable<const FunctionT&, const T&>
auto capture (const T &value) const
 Capture a comparable value such as a resource revision or a tuple of revisions.
 
template<typename CapturedT, typename T>
requires requires(const CapturedT& captured, const ProjectedSnapshot& policy, const T& value) { { captured == policy.capture(value) } -> std::convertible_to<bool>; }
bool matches (const CapturedT &captured, const T &value) const
 Recompute the tracking value without copying the resource itself.
 

Private Attributes

FunctionT m_function
 

Constructor & Destructor Documentation

◆ ProjectedSnapshot()

template<typename FunctionT>
serif::utils::dependencies::ProjectedSnapshot< FunctionT >::ProjectedSnapshot ( FunctionT function)
inlineexplicit

Own the policy callable so its configuration travels with the source.

Member Function Documentation

◆ capture()

template<typename FunctionT>
template<typename T>
requires std::invocable<const FunctionT&, const T&>
auto serif::utils::dependencies::ProjectedSnapshot< FunctionT >::capture ( const T & value) const
inlinenodiscard

Capture a comparable value such as a resource revision or a tuple of revisions.

◆ matches()

template<typename FunctionT>
template<typename CapturedT, typename T>
requires requires(const CapturedT& captured, const ProjectedSnapshot& policy, const T& value) { { captured == policy.capture(value) } -> std::convertible_to<bool>; }
bool serif::utils::dependencies::ProjectedSnapshot< FunctionT >::matches ( const CapturedT & captured,
const T & value ) const
inlinenodiscard

Recompute the tracking value without copying the resource itself.

Member Data Documentation

◆ m_function

template<typename FunctionT>
FunctionT serif::utils::dependencies::ProjectedSnapshot< FunctionT >::m_function
private

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