aermicioi.aedi.factory.generic_factory

Members

Aliases

isNonStaticMethodCompatible
alias isNonStaticMethodCompatible = templateAnd!(isMethodCompatible, chain!(templateNot!isStaticFunction, getCompatibleOverload))
Undocumented in source.
isNonStaticMethodCompatibleAndReturnTypeOf
alias isNonStaticMethodCompatibleAndReturnTypeOf(X) = templateAnd!(isMethodCompatible, chain!(templateNot!isStaticFunction, getCompatibleOverload), partialSuffixed!(chain!(partialPrefixed!(get, 0), getCompatibleOverload), X))
Undocumented in source.
isStaticMethodCompatible
alias isStaticMethodCompatible = templateAnd!(isMethodCompatible, chain!(isStaticFunction, getCompatibleOverload))
Undocumented in source.

Classes

CallbackConfigurer
class CallbackConfigurer(T, Dg, Args...)

Configures/modifies data of type T with help of a delegate or function.

CallbackFactory
class CallbackFactory(T, Dg, Args...)

Instantiates data of type T using a delegate or function.

ConstructorBasedFactory
class ConstructorBasedFactory(T, Args...)

Instantiates aggregate using it's constructor with args.

DefaultConstructorBasedFactory
class DefaultConstructorBasedFactory(T)

Instantiates an aggregate using it's constructor with no arguments.

DelegatingInstanceFactory
class DelegatingInstanceFactory(T, X : T)

InstanceFactory that delegates the task of instantiating a component to some third party factory.

FactoryMethodBasedFactory
class FactoryMethodBasedFactory(T, string method, W, Args...)

Instantiates an aggregate using a method from other aggregate (factory method pattern).

FieldConfigurer
class FieldConfigurer(T, string property, Arg)

Sets aggregate's field to a value.

GenericFactoryImpl
class GenericFactoryImpl(T)

A concrete implementation of GenericFactory interface.

MethodConfigurer
class MethodConfigurer(T, string property, Args...)

Calls aggregate's method with a set of arguments.

ParameterHolder
class ParameterHolder(Args...)

ParameterHolder Stores a set of Args for futher usage in it's subclasses.

ValueInstanceFactory
class ValueInstanceFactory(T)

Instantiates a component using a value as basis.

Functions

callbackConfigurer
auto callbackConfigurer(Locator!() locator, void delegate(Locator!(), T, Args) dg, Args args)
auto callbackConfigurer(Locator!() locator, void function(Locator!(), T, Args) dg, Args args)
auto callbackConfigurer(Locator!() locator, void delegate(Locator!(), ref T, Args) dg, Args args)
auto callbackConfigurer(Locator!() locator, void function(Locator!(), ref T, Args) dg, Args args)

Configures/modifies data of type T with help of a delegate or function.

callbackFactory
auto callbackFactory(Locator!() locator, T delegate(Locator!(), Args) dg, Args args)
auto callbackFactory(Locator!() locator, T function(Locator!(), Args) dg, Args args)

Instantiates data of type T using a delegate or function.

constructorBasedFactory
auto constructorBasedFactory(Locator!() locator, Args args)

Instantiates aggregate using it's constructor with args.

factoryMethodBasedFactory
auto factoryMethodBasedFactory(Locator!() locator, W factoryMethod, Args args)
auto factoryMethodBasedFactory(Locator!() locator, Args args)

Instantiates an aggregate using a method from other aggregate (factory method pattern).

fieldConfigurer
auto fieldConfigurer(Locator!() locator, Arg arg)

Sets aggregate's field to a value.

genericFactory
GenericFactory!T genericFactory(Locator!() locator)

A concrete implementation of GenericFactory interface.

methodConfigurer
auto methodConfigurer(Locator!() locator, Args args)

Calls aggregate's method with a set of arguments.

Interfaces

GenericFactory
interface GenericFactory(T)

A generic factory, is a factory that instantiates data of type T using InstanceFactory and a list of PropertyConfigurers.

InstanceFactory
interface InstanceFactory(T)

An instance factory, instantiates data of type T.

InstanceFactoryAware
interface InstanceFactoryAware(T)

Interface for objects that are aware of an instance factory and can use it to instantiate a component.

PropertyConfigurer
interface PropertyConfigurer(T)

A property configurer, has the purpose to modify data of type T according to some logic encapsulated in it.

PropertyConfigurersAware
interface PropertyConfigurersAware(T)

Interface for objects that are aware of a set of property configurers and can use them to configure some component.

Mixin templates

assertFieldCompatible
mixintemplate assertFieldCompatible(T, string field, Arg)
Undocumented in source.
assertObjectConstructorCompatible
mixintemplate assertObjectConstructorCompatible(T, Args...)
Undocumented in source.
assertObjectMethodCompatible
mixintemplate assertObjectMethodCompatible(T, string method, Args...)
Undocumented in source.

Templates

getCompatibleOverload
template getCompatibleOverload(T, string method, Args...)
Undocumented in source.
isArgumentListCompatible
template isArgumentListCompatible(alias func, ArgTuple...)

An check if the argument list passed to ConstructorBasedFactory or MethodConfigurer is compatible with signature of underlying method or constructor.

isMethodCompatible
template isMethodCompatible(T, string method, Args...)
Undocumented in source.

Variables

isFieldCompatible
enum bool isFieldCompatible(T, string field, Arg);
Undocumented in source.
isObjectConstructorCompatible
enum bool isObjectConstructorCompatible(T, Args...);
Undocumented in source.
isObjectMethodCompatible
enum bool isObjectMethodCompatible(T, string method, Args...);
Undocumented in source.

Meta

License

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following:

The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Authors

Alexandru Ermicioi