Refactoring of the interaction factory
Description
Several changes to code that creates the interactions:
- Move the parsing of the options used to create the interactions from the abstract factory to the concrete one.
- Change the
supported_interactionsandsupported_interactions_as_partnerlists to allocatable arrays of integers. This makes the code more robust when adding new systems. - Move and split the code in the abstract interaction factory into two parts:
- Construction of a list of interaction partners supporting a given type of interaction. This is now a method of
interaction_partner_t. - Creation of the interactions between a system and a list of available partners. This is now a method of
system_t.
- Construction of a list of interaction partners supporting a given type of interaction. This is now a method of
- Merged the
init_all_interactionsinto the newcreate_interactionsmethod.
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