Update propagation module architecture to accept different P2P models#969
Update propagation module architecture to accept different P2P models#969mglesser wants to merge 24 commits into
Conversation
…o p2p-propagation-model-archi
…read to CnossosPropagationModel
| * @param modelName Name of the propagation model | ||
| * @return propagation model object | ||
| */ | ||
| public static PropagationModel create(String modelName){ |
There was a problem hiding this comment.
This is not the factory method pattern:
The goal of a factory is to be able to add new propagation model without having to change the source code of noisemodelling-propagation
So in the main NoiseMapByReceiverMaker, you provide an implementation of the PropagationModelFactory (PropagationModelFactory being an Interface or abstract class)
NoiseMapByReceiverMaker have a default implementation of PropagationModelFactory that is the Cnossos one
There was a problem hiding this comment.
You can look at
IComputeRaysOutFactory
TableLoader
That provide such pattern (can be replaced by another implementation)
There was a problem hiding this comment.
I've modified the code to implement a proper factory method for the propagation models.
Add an interface and a factory class for propagation models.