FactoryMethodBasedFactory

Instantiates a component using a method from other component (factory method pattern).

Encapsulates construction of component using factory method. Arguments that are RuntimeReferences, will be replaced with components extracted from locator, and passed to factory's method. In case when method is not static member, the algorithm will use an instantiaton of factory passed to it, or extracted from locator if a RuntimeReference is passed.

  1. template FactoryMethodBasedFactory(T, string method, W, Args...)
    template FactoryMethodBasedFactory (
    T
    string method
    W
    Args...
    ) {}
  2. template FactoryMethodInstanceFactory(string method, T, W, Args...)
  3. auto factoryMethodBasedFactory(Args args)

Members

Aliases

FactoryMethodBasedFactory
alias FactoryMethodBasedFactory = FactoryMethodInstanceFactory!(method, T, W, Args)
Undocumented in source.

Parameters

T

factory that is used to instantiate component using it's method

method

the name of method used to instantiate component

W

the factory T, or a RuntimeReference to the factory.

Args

type tuple of arguments passed to factory.

Meta