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.

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.

ParentAwareGenericFactory
class ParentAwareGenericFactory(T)

Instantiates data of type T using another factory, and configures it with help of it's own property configurers.

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)

Call dg on an aggregate that is in configuration phase.

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

Construct aggregate using a delegate.

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

Construct aggregate using args.

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

Invoke T's method to create data of type X.

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

Set aggregate's public field to passed arg.

genericFactory
GenericFactory!T genericFactory(Locator!() locator)
Undocumented in source. Be warned that the author may not have intended to support it.
methodConfigurer
auto methodConfigurer(Locator!() locator, Args args)

Invoke aggregate's method with supplied args.

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.

PropertyConfigurer
interface PropertyConfigurer(T)

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

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