/[ascend]/trunk/pygtk/interface/solverparameter.h
ViewVC logotype

Contents of /trunk/pygtk/interface/solverparameter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 225 - (show annotations) (download) (as text)
Fri Jan 27 14:55:43 2006 UTC (14 years, 10 months ago) by johnpye
File MIME type: text/x-chdr
File size: 1425 byte(s)
Added const-ness to 2nd parameter of slv_set_char_parameter.
Implemented setting of int, real and string parameters via PyGTK interface.
1 #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 void setIntValue(const int&);
41
42 const bool getBoolValue() const;
43 void setBoolValue(const bool&);
44
45 const std::string getStrValue() const;
46 const std::vector<std::string> getStrOptions() const;
47 void setStrValue(const std::string &);
48 void setStrOption(const int &opt);
49
50 const double &getRealValue() const;
51 const double &getRealLowerBound() const;
52 const double &getRealUpperBound() const;
53 void setRealValue(const double&);
54
55 const bool isBounded() const;
56
57 const std::string toString() const;
58 };
59
60 #endif

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