capydi
Loading...
Searching...
No Matches
capy::di::CreationalConfig Concept Reference

Concept for configurations that handle dependency creation and instantiation. More...

#include <CreationalConfig.hpp>

Concept definition

template<typename Config>
concept capy::di::CreationalConfig = requires() {
typename Config::CentralType;
typename Config::ResolutionKeysPack;
Config::CONFIG_TYPE;
}
&& std::same_as<std::remove_cv_t<decltype(Config::CONFIG_TYPE)>, ConfigType>
&& Config::CONFIG_TYPE == ConfigType::CREATIONAL
Concept for configurations that handle dependency creation and instantiation.
Definition CreationalConfig.hpp:50
ConfigType
Categorization of configuration strategies in the DI container.
Definition ConfigType.hpp:24
@ CREATIONAL
Creational configs handle object instantiation and factory patterns. These are responsible for creati...
Definition ConfigType.hpp:27

Detailed Description

Concept for configurations that handle dependency creation and instantiation.

A CreationalConfig declares:

  • CentralType: The primary type being created/managed
  • ResolutionKeysPack: A meta::Pack of types that can be used to look up this config
  • CONFIG_TYPE: Must be ConfigType::CREATIONAL
  • do_resolve(key): Method to perform the actual creation
Template Parameters
ConfigThe configuration type being tested.