roadrunner  2.6.0
Fast simulator for SBML models
SteadyStateSolverDecorator.h
1 //
2 // Created by Ciaran on 12/03/2021.
3 //
4 
5 #ifndef ROADRUNNER_STEADYSTATESOLVERDECORATOR_H
6 #define ROADRUNNER_STEADYSTATESOLVERDECORATOR_H
7 
8 #include "SteadyStateSolver.h"
9 #include <iostream>
10 
11 namespace rr {
12 
21  public:
22  using SteadyStateSolver::SteadyStateSolver;
23 
24  ~SteadyStateSolverDecorator() override = default;
25 
26  SteadyStateSolverDecorator() = default;
27 
29 
35  void syncWithModel(ExecutableModel *m) override;
36 
37  double solve() override;
38 
39  std::string getName() const override;
40 
41  std::string getDescription() const override;
42 
43  std::string getHint() const override;
44 
45  void resetSettings() override;
46 
47  protected:
48  SteadyStateSolver *solver_;
49 
50  private:
51 
57  virtual std::string decoratorName() const;
58 
59  };
60 
61 
62 
63 //
65 // * Concrete decorators call the wrapped object and alter its
66 // * result in some way.
67 // */
68 // class ConcreteDecoratorA : public Decorator {
69 // public:
70 // ConcreteDecoratorA(Component *component)
71 // : Decorator(component) {}
72 //
73 // std::string Operation() override {
74 // return "ConcreteDecoratorA(" + Decorator::Operation() + ")";
75 // }
76 // };
77 //
78 // class ConcreteDecoratorB : public Decorator {
79 // public:
80 // ConcreteDecoratorB(Component *component)
81 // : Decorator(component) {}
82 //
83 // std::string Operation() override {
84 // return "ConcreteDecoratorB(" + Decorator::Operation() + ")";
85 // }
86 // };
87 //
89 // * The client code works with all objects using the Component interface.
90 // * This way it remains independent of the concrete classes of components
91 // * it works with
92 // */
93 // void clientCode(Component *component) {
94 // std::cout << component->Operation() << std::endl;
95 // }
96 }
97 
98 #endif //ROADRUNNER_STEADYSTATESOLVERDECORATOR_H
Contains the base class for RoadRunner solvers.
Base class for all code generation systems; allows compiling and evaluating the model.
Definition: rrExecutableModel.h:118
The base class Decorator follows the same interface as other SteadyStateSolvers.
Definition: SteadyStateSolverDecorator.h:20
std::string getHint() const override
Gets the hint associated with this Solver type.
Definition: SteadyStateSolverDecorator.cpp:30
void syncWithModel(ExecutableModel *m) override
Base decorator delegates all work to the wrapped steady state solver.
Definition: SteadyStateSolverDecorator.cpp:9
void resetSettings() override
Implements settings shared by all steady state solvers.
Definition: SteadyStateSolverDecorator.cpp:34
std::string getName() const override
Gets the name associated with this Solver type.
Definition: SteadyStateSolverDecorator.cpp:22
std::string getDescription() const override
Gets the description associated with this Solver type.
Definition: SteadyStateSolverDecorator.cpp:26
SteadyStateSolver is an abstract base class that provides an interface to specific steady-state solve...
Definition: SteadyStateSolver.h:38