GridFire 0.6.0
General Purpose Nuclear Network
Loading...
Searching...
No Matches
gridfire::solver::SolverContextBase Struct Referenceabstract

Base class for solver callback contexts. More...

#include <solver.h>

Inheritance diagram for gridfire::solver::SolverContextBase:
gridfire::solver::DirectNetworkSolver::TimestepContext

Public Member Functions

virtual ~SolverContextBase ()=default
 
virtual std::vector< std::tuple< std::string, std::string > > describe () const =0
 Describe the context for callback functions.
 

Detailed Description

Base class for solver callback contexts.

This struct serves as a base class for contexts that can be passed to solver callbacks, it enforces that derived classes implement a describe method that returns a vector of tuples describing the context that a callback will receive when called.

Constructor & Destructor Documentation

◆ ~SolverContextBase()

virtual gridfire::solver::SolverContextBase::~SolverContextBase ( )
virtualdefault

Member Function Documentation

◆ describe()

virtual std::vector< std::tuple< std::string, std::string > > gridfire::solver::SolverContextBase::describe ( ) const
pure virtual

Describe the context for callback functions.

Returns
A vector of tuples, each containing a string for the parameters name and a string for its type.

This method should be overridden by derived classes to provide a description of the context that will be passed to the callback function. The intent of this method is that an end user can investigate the context that will be passed to the callback function, and use this information to craft their own callback function.

Implemented in gridfire::solver::DirectNetworkSolver::TimestepContext.


The documentation for this struct was generated from the following file: