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

Own independent computation caches under compile-time role keys; this store does not connect their graphs. More...

#include <computation_store.hpp>

Public Types

using Bindings = dependencies::Bindings<Binding<typename EntryTs::Key, typename EntryTs::Target>...>
 

Public Member Functions

 ComputationStore (EntryTs... entries)
 Consumers may borrow entries while this store or a moved-to successor remains alive.
 
 ComputationStore (const ComputationStore &)=delete
 Duplicating ownership would give consumers ambiguous cache identities.
 
ComputationStore & operator= (const ComputationStore &)=delete
 
 ComputationStore (ComputationStore &&) noexcept=default
 Moving a store preserves the addresses of all its computations.
 
ComputationStore & operator= (ComputationStore &&)=delete
 Do not replace computations that existing consumers may still reference.
 
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
auto & get () &
 Retrieve a computation by its model role, independently of its implementation type.
 
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
const auto & get () const &
 Const owners expose read-only access to each computation.
 
template<typename KeyT>
auto get () &&=delete
 Borrowed computations must not outlive a temporary store.
 
template<typename KeyT>
auto get () const &&=delete
 

Private Attributes

std::tuple< EntryTs... > m_entries
 

Detailed Description

template<IsOwnedComputation... EntryTs>
requires misc::traits::all_unique_types_v<typename EntryTs::Key...>
class serif::utils::dependencies::ComputationStore< EntryTs >

Own independent computation caches under compile-time role keys; this store does not connect their graphs.

Member Typedef Documentation

◆ Bindings

template<IsOwnedComputation... EntryTs>
using serif::utils::dependencies::ComputationStore< EntryTs >::Bindings = dependencies::Bindings<Binding<typename EntryTs::Key, typename EntryTs::Target>...>

Constructor & Destructor Documentation

◆ ComputationStore() [1/3]

template<IsOwnedComputation... EntryTs>
serif::utils::dependencies::ComputationStore< EntryTs >::ComputationStore ( EntryTs... entries)
inlineexplicit

Consumers may borrow entries while this store or a moved-to successor remains alive.

◆ ComputationStore() [2/3]

template<IsOwnedComputation... EntryTs>
serif::utils::dependencies::ComputationStore< EntryTs >::ComputationStore ( const ComputationStore< EntryTs > & )
delete

Duplicating ownership would give consumers ambiguous cache identities.

◆ ComputationStore() [3/3]

template<IsOwnedComputation... EntryTs>
serif::utils::dependencies::ComputationStore< EntryTs >::ComputationStore ( ComputationStore< EntryTs > && )
defaultnoexcept

Moving a store preserves the addresses of all its computations.

Member Function Documentation

◆ get() [1/4]

template<IsOwnedComputation... EntryTs>
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
auto & serif::utils::dependencies::ComputationStore< EntryTs >::get ( ) &
inlinenodiscard

Retrieve a computation by its model role, independently of its implementation type.

◆ get() [2/4]

template<IsOwnedComputation... EntryTs>
template<typename KeyT>
auto serif::utils::dependencies::ComputationStore< EntryTs >::get ( ) &&
delete

Borrowed computations must not outlive a temporary store.

◆ get() [3/4]

template<IsOwnedComputation... EntryTs>
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
const auto & serif::utils::dependencies::ComputationStore< EntryTs >::get ( ) const &
inlinenodiscard

Const owners expose read-only access to each computation.

◆ get() [4/4]

template<IsOwnedComputation... EntryTs>
template<typename KeyT>
auto serif::utils::dependencies::ComputationStore< EntryTs >::get ( ) const &&
delete

◆ operator=() [1/2]

template<IsOwnedComputation... EntryTs>
ComputationStore & serif::utils::dependencies::ComputationStore< EntryTs >::operator= ( ComputationStore< EntryTs > && )
delete

Do not replace computations that existing consumers may still reference.

◆ operator=() [2/2]

template<IsOwnedComputation... EntryTs>
ComputationStore & serif::utils::dependencies::ComputationStore< EntryTs >::operator= ( const ComputationStore< EntryTs > & )
delete

Member Data Documentation

◆ m_entries

template<IsOwnedComputation... EntryTs>
std::tuple<EntryTs...> serif::utils::dependencies::ComputationStore< EntryTs >::m_entries
private

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