Feature #1847

Implement IFactory with constructor parameters

Added by pospelov about 2 years ago.

Status:BacklogStart date:29 Sep 2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Implement possibility to save arbitrary number of object parameters in IFactory::registerItem

Something like:

registerItem("CylinderSpecial",
              create_new<FormFactorCylinder>,
              "Special version of cylinder",
              2.0, 3.0);

this will allow to create objects like
auto ff = create("CylinderSpecial")
without specifying cylinder parameters.

Refactoring should involve variadic templates and tuples to make it possible.

This will allow further simplification of functional test machinery.
  • StandardTestService+StandardTestCatalogue will go in the favor of unique TestService.
  • Class IRegistry can be thrown away
  • TranslationTests, SampleComponents can be simplified

Also available in: Atom PDF