Skip to content

Implement Singleton Pattern for XSLibrary #175

@bkochuna

Description

@bkochuna

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.

  • Implement singleton pattern for XSLibrary
  • Update unit testing for XSLibrary
  • Update clients of XSLibary to access singleton and eliminate dummy arguments
  • Update appropriate unit tests

Definition of Done

The aforementioned tasks have been completed. The code has been reviewed. The checks have passed. The branch has been merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions