/[ascend]/trunk/ascxx/solverparameter.h
ViewVC logotype

Contents of /trunk/ascxx/solverparameter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2327 - (show annotations) (download) (as text)
Wed Dec 22 07:17:24 2010 UTC (8 years, 6 months ago) by jpye
File MIME type: text/x-chdr
File size: 1379 byte(s)
Merging in refactor of the C++ code, which is moved out of 'pygtk' and into 'ascxx'.
Adding support for IPOPT 3.9.1, the current latest version.
Support in dtar for parallel builds (possibly needs some testing still).
1 #ifndef ASCXX_SOLVER_PARAMETER_H
2 #define ASCXX_SOLVER_PARAMETER_H
3
4 #include <string>
5 #include <vector>
6
7 #include "config.h"
8 extern "C"{
9 #include "ascend/system/slv_param.h"
10 }
11
12 #include "value.h"
13
14 class SolverParameter{
15 private:
16 struct slv_parameter *p;
17
18 public:
19 explicit SolverParameter(slv_parameter *);
20 SolverParameter &operator=(const SolverParameter &);
21
22 const std::string getName() const;
23 const std::string getDescription() const;
24 const std::string getLabel() const;
25 const int &getNumber() const;
26 const int &getPage() const;
27
28 const bool isInt() const;
29 const bool isBool() const;
30 const bool isStr() const;
31 const bool isReal() const;
32
33 // The following throw execeptions unless the parameter type is correct
34 const int &getIntValue() const;
35 const int &getIntLowerBound() const;
36 const int &getIntUpperBound() const;
37 void setIntValue(const int&);
38
39 const bool getBoolValue() const;
40 void setBoolValue(const bool&);
41
42 const std::string getStrValue() const;
43 const std::vector<std::string> getStrOptions() const;
44 void setStrValue(const std::string &);
45 void setStrOption(const int &opt);
46
47 const double &getRealValue() const;
48 const double &getRealLowerBound() const;
49 const double &getRealUpperBound() const;
50 void setRealValue(const double&);
51
52 const bool isBounded() const;
53
54 const std::string toString() const;
55
56 void setValueValue(const Value &V);
57 };
58
59 #endif

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22