Right now the populateXSec method on the Material class takes a pointer argument for the XSLibrary class. Having this class as an argument complicates creating a C interface for the class.
Further, in 99% of our use cases, we will most likely have only 1 cross section library for all materials. Therefore, it should be beneficial to implement the Singleton pattern for the XSLibrary class. In doing so, we can then simplify all interfaces that take XSLibrary class as an argument.
To complete this issue, the following tasks should be completed.
Definition of Done
The aforementioned tasks have been completed. The code has been reviewed. The checks have passed. The branch has been merged.
Right now the
populateXSecmethod on theMaterialclass takes a pointer argument for theXSLibraryclass. Having this class as an argument complicates creating a C interface for the class.Further, in 99% of our use cases, we will most likely have only 1 cross section library for all materials. Therefore, it should be beneficial to implement the Singleton pattern for the
XSLibraryclass. In doing so, we can then simplify all interfaces that takeXSLibraryclass as an argument.To complete this issue, the following tasks should be completed.
XSLibraryXSLibraryXSLibaryto access singleton and eliminate dummy argumentsDefinition of Done
The aforementioned tasks have been completed. The code has been reviewed. The checks have passed. The branch has been merged.