A base class needs to be added called iteration::subroutine::HasSubroutine that supports adding one or more subroutines to an inheriting class.
- The class should have a template parameter that is an
enum identifying the locations that subroutines can be located.
- Subroutines are installed using
AddSubroutine(LocationEnum, std::unique_ptr<SubroutineI>) that installs in particular locations.
- Provides a calling function
Execute(LocationEnum, system::System) that executes the subroutine stored in the given location if the subroutine pointer is non-null.
A base class needs to be added called
iteration::subroutine::HasSubroutinethat supports adding one or more subroutines to an inheriting class.enumidentifying the locations that subroutines can be located.AddSubroutine(LocationEnum, std::unique_ptr<SubroutineI>)that installs in particular locations.Execute(LocationEnum, system::System)that executes the subroutine stored in the given location if the subroutine pointer is non-null.