SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > > Class Template Reference

#include <dependency_context.hpp>

Public Types

using Keys = KeyList<KeyTs...>
 
using Bindings = dependencies::Bindings<Binding<KeyTs, bound_type_t<typename ParentT::Bindings, KeyTs>>...>
 
using ResourceBindings = dependencies::Bindings<Binding<KeyTs, bound_type_t<typename ParentT::ResourceBindings, KeyTs>>...>
 
using Resources = types::TypeList<bound_type_t<typename ParentT::ResourceBindings, KeyTs>...>
 

Public Member Functions

 DependencyContextView (const ParentT &parent)
 The parent context must outlive this view.
 
 DependencyContextView (const ParentT &&)=delete
 Reject temporary parents even when constructing a view directly.
 
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
const auto & get () const
 Expose only the declared portion of the parent context.
 
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
const auto & resource () const
 Preserve the original source identity and tracking policy through selection.
 

Private Attributes

const ParentT & m_parent
 

Member Typedef Documentation

◆ Bindings

template<typename ParentT, typename... KeyTs>
using serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::Bindings = dependencies::Bindings<Binding<KeyTs, bound_type_t<typename ParentT::Bindings, KeyTs>>...>

◆ Keys

template<typename ParentT, typename... KeyTs>
using serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::Keys = KeyList<KeyTs...>

◆ ResourceBindings

template<typename ParentT, typename... KeyTs>
using serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::ResourceBindings = dependencies::Bindings<Binding<KeyTs, bound_type_t<typename ParentT::ResourceBindings, KeyTs>>...>

◆ Resources

template<typename ParentT, typename... KeyTs>
using serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::Resources = types::TypeList<bound_type_t<typename ParentT::ResourceBindings, KeyTs>...>

Constructor & Destructor Documentation

◆ DependencyContextView() [1/2]

template<typename ParentT, typename... KeyTs>
serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::DependencyContextView ( const ParentT & parent)
inlineexplicit

The parent context must outlive this view.

◆ DependencyContextView() [2/2]

template<typename ParentT, typename... KeyTs>
serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::DependencyContextView ( const ParentT && )
delete

Reject temporary parents even when constructing a view directly.

Member Function Documentation

◆ get()

template<typename ParentT, typename... KeyTs>
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
const auto & serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::get ( ) const
inlinenodiscard

Expose only the declared portion of the parent context.

◆ resource()

template<typename ParentT, typename... KeyTs>
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
const auto & serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::resource ( ) const
inlinenodiscard

Preserve the original source identity and tracking policy through selection.

Member Data Documentation

◆ m_parent

template<typename ParentT, typename... KeyTs>
const ParentT& serif::utils::dependencies::DependencyContextView< ParentT, KeyList< KeyTs... > >::m_parent
private

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