Skip to content

Add exception to allow elements not to build

Pascal Merz requested to merge ptmerz-builders-1 into ptmerz-builders-feature-branch

This is part of task #3437 (closed), implementing builders to create the modules of modular simulator. The approach is explained in docs/doxygen/lib/modularsimulator.md, "### Building modules".

The current change implements an exception signalling that an element does not need to be built. This can be used by the constructor of an element, allowing it to refuse the construction process. This exception can then be caught by the builder. Having the module constructor checking for the need to be built, and not the builder, allows to use forwarding of parameter packs from the builder to the element, instead of writing out all arguments in the constructors of both the builder and the element.

Further, the current change adds a description of the builder approach to the documentation.

Refs #3437 (closed)

Merge request reports