capydi
Loading...
Searching...
No Matches
capy::di::Singleton< Type > Class Template Reference

#include <Singleton.hpp>

Inheritance diagram for capy::di::Singleton< Type >:
Collaboration diagram for capy::di::Singleton< Type >:

Public Types

using CentralType = Type
using ResolutionKeysPack
using DependenciesPack = meta::args_pack_t<decltype(CentralType::create)>

Public Member Functions

template<typename... Dependencies>
std::expected< meta::RuntimeRef< Type >, Errordo_resolve (meta::Pack< Type > keys, std::tuple< Dependencies... > &dependencies, meta::wrapped_with< ResolutionContext > auto &context, const auto &input) const
template<typename... Dependencies>
std::expected< meta::RuntimeRef< const Type >, Errordo_resolve (meta::Pack< const Type > keys, std::tuple< Dependencies... > &dependencies, meta::wrapped_with< ResolutionContext > auto &context, const auto &input) const
template<std::size_t DependencyIndex>
std::optional< std::tuple<> > get_dependencies_input () const
Public Member Functions inherited from capy::di::DecoratableConfig< Singleton< Type > >
auto with (Args &&... args) &&

Static Public Attributes

static constexpr ConfigType CONFIG_TYPE = ConfigType::CREATIONAL

Member Typedef Documentation

◆ CentralType

template<typename Type>
using capy::di::Singleton< Type >::CentralType = Type

◆ DependenciesPack

template<typename Type>
using capy::di::Singleton< Type >::DependenciesPack = meta::args_pack_t<decltype(CentralType::create)>

◆ ResolutionKeysPack

template<typename Type>
using capy::di::Singleton< Type >::ResolutionKeysPack
Initial value:
>
A compile-time heterogeneous type list.
Definition Pack.hpp:70

Member Function Documentation

◆ do_resolve() [1/2]

template<typename Type>
template<typename... Dependencies>
std::expected< meta::RuntimeRef< const Type >, Error > capy::di::Singleton< Type >::do_resolve ( meta::Pack< const Type > keys,
std::tuple< Dependencies... > & dependencies,
meta::wrapped_with< ResolutionContext > auto & context,
const auto & input ) const
inline
Here is the call graph for this function:

◆ do_resolve() [2/2]

template<typename Type>
template<typename... Dependencies>
std::expected< meta::RuntimeRef< Type >, Error > capy::di::Singleton< Type >::do_resolve ( meta::Pack< Type > keys,
std::tuple< Dependencies... > & dependencies,
meta::wrapped_with< ResolutionContext > auto & context,
const auto & input ) const
inline
Here is the caller graph for this function:

◆ get_dependencies_input()

template<typename Type>
template<std::size_t DependencyIndex>
std::optional< std::tuple<> > capy::di::Singleton< Type >::get_dependencies_input ( ) const
inline

Member Data Documentation

◆ CONFIG_TYPE

template<typename Type>
ConfigType capy::di::Singleton< Type >::CONFIG_TYPE = ConfigType::CREATIONAL
staticconstexpr

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