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

#include <context.hpp>

Public Types

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

Public Member Functions

 ContextView (const ParentT &parent)
 The parent context must outlive this view.
 
 ContextView (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... Keys>
using serif::utils::dependencies::ContextView< ParentT, Declaration< Keys... > >::Bindings = dependencies::Bindings<Binding<Keys, bound_type_t<typename ParentT::Bindings, Keys>>...>

◆ ResourceBindings

template<typename ParentT, typename... Keys>
using serif::utils::dependencies::ContextView< ParentT, Declaration< Keys... > >::ResourceBindings = dependencies::Bindings<Binding<Keys, bound_type_t<typename ParentT::ResourceBindings, Keys>>...>

◆ Resources

template<typename ParentT, typename... Keys>
using serif::utils::dependencies::ContextView< ParentT, Declaration< Keys... > >::Resources = types::TypeList<bound_type_t<typename ParentT::ResourceBindings, Keys>...>

Constructor & Destructor Documentation

◆ ContextView() [1/2]

template<typename ParentT, typename... Keys>
serif::utils::dependencies::ContextView< ParentT, Declaration< Keys... > >::ContextView ( const ParentT & parent)
inlineexplicit

The parent context must outlive this view.

◆ ContextView() [2/2]

template<typename ParentT, typename... Keys>
serif::utils::dependencies::ContextView< ParentT, Declaration< Keys... > >::ContextView ( const ParentT && )
delete

Reject temporary parents even when constructing a view directly.

Member Function Documentation

◆ get()

template<typename ParentT, typename... Keys>
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
const auto & serif::utils::dependencies::ContextView< ParentT, Declaration< Keys... > >::get ( ) const
inlinenodiscard

Expose only the declared portion of the parent context.

◆ resource()

template<typename ParentT, typename... Keys>
template<typename KeyT>
requires BindingsWithBinding<Bindings, KeyT>
const auto & serif::utils::dependencies::ContextView< ParentT, Declaration< Keys... > >::resource ( ) const
inlinenodiscard

Preserve the original source identity and tracking policy through selection.

Member Data Documentation

◆ m_parent

template<typename ParentT, typename... Keys>
const ParentT& serif::utils::dependencies::ContextView< ParentT, Declaration< Keys... > >::m_parent
private

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