Skip to content

Refactoring of the interaction factory

Description

Several changes to code that creates the interactions:

  1. Move the parsing of the options used to create the interactions from the abstract factory to the concrete one.
  2. Change the supported_interactions and supported_interactions_as_partner lists to allocatable arrays of integers. This makes the code more robust when adding new systems.
  3. Move and split the code in the abstract interaction factory into two parts:
    1. Construction of a list of interaction partners supporting a given type of interaction. This is now a method of interaction_partner_t.
    2. Creation of the interactions between a system and a list of available partners. This is now a method of system_t.
  4. Merged the init_all_interactions into the new create_interactions method.

Point 3 allows for greater flexibility in the way how systems create their interactions.

News snippet

Extensive refactor of the multisystem interaction factories.

Checklist

  • I have checked that my code follows the Octopus coding standards
  • I have added tests for all the new features added in this request.
Edited by Micael Oliveira

Merge request reports

Loading