Function callbackConfigurer

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

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

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

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

auto auto callbackConfigurer(T, Args...) (
  Locator!() locator,
  void function(Locator!(), ref T, Args) dg,
  auto ref Args 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.

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

NameDescription
T the aggregate
Args type tuple of arguments used by delegate for customization.