1 |
johnpye |
221 |
#ifndef ASCXX_SOLVER_PARAMETER_H |
2 |
|
|
#define ASCXX_SOLVER_PARAMETER_H |
3 |
|
|
|
4 |
|
|
#include <string> |
5 |
|
|
#include <vector> |
6 |
|
|
|
7 |
|
|
extern "C"{ |
8 |
|
|
#include <stdio.h> |
9 |
|
|
#include "utilities/ascConfig.h" |
10 |
|
|
#include "solver/slv_types.h" |
11 |
|
|
#include "solver/rel.h" |
12 |
|
|
#include "solver/logrel.h" |
13 |
|
|
#include "solver/mtx.h" |
14 |
|
|
#include "general/list.h" |
15 |
|
|
#include "solver/slv_common.h" |
16 |
|
|
} |
17 |
|
|
|
18 |
|
|
class SolverParameter{ |
19 |
|
|
private: |
20 |
|
|
struct slv_parameter *p; |
21 |
|
|
|
22 |
|
|
public: |
23 |
|
|
explicit SolverParameter(slv_parameter *); |
24 |
|
|
|
25 |
|
|
const std::string getName() const; |
26 |
|
|
const std::string getDescription() const; |
27 |
|
|
const std::string getLabel() const; |
28 |
|
|
const int &getNumber() const; |
29 |
|
|
const int &getPage() const; |
30 |
|
|
|
31 |
|
|
const bool isInt() const; |
32 |
|
|
const bool isBool() const; |
33 |
|
|
const bool isStr() const; |
34 |
|
|
const bool isReal() const; |
35 |
|
|
|
36 |
|
|
// The following throw execeptions unless the parameter type is correct |
37 |
|
|
const int &getIntValue() const; |
38 |
|
|
const int &getIntLowerBound() const; |
39 |
|
|
const int &getIntUpperBound() const; |
40 |
johnpye |
225 |
void setIntValue(const int&); |
41 |
johnpye |
221 |
|
42 |
|
|
const bool getBoolValue() const; |
43 |
johnpye |
225 |
void setBoolValue(const bool&); |
44 |
johnpye |
221 |
|
45 |
|
|
const std::string getStrValue() const; |
46 |
|
|
const std::vector<std::string> getStrOptions() const; |
47 |
johnpye |
225 |
void setStrValue(const std::string &); |
48 |
|
|
void setStrOption(const int &opt); |
49 |
johnpye |
221 |
|
50 |
|
|
const double &getRealValue() const; |
51 |
|
|
const double &getRealLowerBound() const; |
52 |
|
|
const double &getRealUpperBound() const; |
53 |
johnpye |
225 |
void setRealValue(const double&); |
54 |
johnpye |
221 |
|
55 |
johnpye |
225 |
const bool isBounded() const; |
56 |
|
|
|
57 |
johnpye |
221 |
const std::string toString() const; |
58 |
|
|
}; |
59 |
|
|
|
60 |
|
|
#endif |