1 |
#ifndef ASCXX_SOLVERPARAMETERS_H |
2 |
#define ASCXX_SOLVERPARAMETERS_H |
3 |
|
4 |
extern "C"{ |
5 |
#include <ascend/system/slv_common.h> |
6 |
} |
7 |
|
8 |
#include "solver.h" |
9 |
#include "solverparameter.h" |
10 |
|
11 |
#include <string> |
12 |
|
13 |
// Iterator class for SolverParameters :-) |
14 |
|
15 |
class SolverParameterIterator; |
16 |
class SolverParameter; |
17 |
class Integrator; |
18 |
|
19 |
/// Wrapper class for slv_parameters_t |
20 |
class SolverParameters{ |
21 |
|
22 |
typedef SolverParameterIterator iterator; |
23 |
|
24 |
private: |
25 |
slv_parameters_t p; |
26 |
|
27 |
protected: |
28 |
friend class Simulation; |
29 |
friend class Integrator; |
30 |
|
31 |
explicit SolverParameters(const slv_parameters_t &); |
32 |
slv_parameters_t &getInternalType(); |
33 |
inline const slv_parameters_t &getInternalTypeConst() const{return p;} |
34 |
|
35 |
friend class SolverParameterIterator; |
36 |
|
37 |
public: |
38 |
SolverParameters(); |
39 |
SolverParameters(const SolverParameters &); |
40 |
|
41 |
const std::string toString() const; |
42 |
|
43 |
const int getLength() const; ///< Number of parameters |
44 |
SolverParameter getParameter(const int &index) const; |
45 |
SolverParameter getParameter(const std::string &name) const; |
46 |
|
47 |
const SolverParameterIterator begin() const; |
48 |
const SolverParameterIterator end() const; |
49 |
}; |
50 |
|
51 |
#endif |