Class CallbackConfigurer
Configures/modifies data of type T with help of a delegate or function.
class CallbackConfigurer(T, Dg, Args...)
if (is(Dg == void delegate(Locator!(), T, Args)) || is(Dg == void function(Locator!(), T, Args)) || is(Dg == void delegate(Locator!(), ref T, Args)) || is(Dg == void function(Locator!(), ref T, Args)));
Encapsulates data configuration logic using a delegate. The algorithm calls delegate, with a locator, a set of Args, and configured data, in order to modify the data somehow.
Constructors
Name | Description |
---|---|
this | Constructor for CallbackConfigurer!(T, Dg, Args) |
Methods
Name | Description |
---|---|
configure | Accepts a reference to an object that is to be configured by the configurer. |
Note
If data is not a reference type it is recommended to pass it by reference in order to avoid receiving of a copy and not original one in delegate.
Parameters
Name | Description |
---|---|
T | the aggregate |
Args | type tuple of arguments used by delegate for customization. |