/[ascend]/trunk/pygtk/type.h
ViewVC logotype

Contents of /trunk/pygtk/type.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1960 - (show annotations) (download) (as text)
Mon Nov 17 12:15:56 2008 UTC (16 years, 5 months ago) by jpye
File MIME type: text/x-chdr
File size: 1332 byte(s)
Add setIntValue to Python wrapper for Instance class.
Added getModule method for Type, planned for use with canvas-based modeller.
1 #ifndef ASCXX_TYPE_H
2 #define ASCXX_TYPE_H
3
4 #include "config.h"
5
6 #include <vector>
7
8 extern "C"{
9 #include <compiler/type_desc.h>
10 }
11
12 class Simulation;
13 class Module;
14
15 #include "symchar.h"
16 #include "method.h"
17 #include "dimensions.h"
18
19 /**
20 A model type as loaded from an ASCEND a4c file. For example, a type
21 might be a 'test_controller' from the simple_fs.a4l example file.
22
23 Once you have a type, you can create an instance of it (getInstance)
24 which will then allow you to start on solving it.
25 */
26 class Type{
27 private:
28 const TypeDescription *t;
29 public:
30 Type();
31 Type(const TypeDescription *t);
32 const SymChar getName() const;
33 const int getParameterCount() const;
34 const TypeDescription *getInternalType() const;
35 Simulation getSimulation(const SymChar &name="sim", const bool &rundefaultmethod=true);
36 const Dimensions getDimensions() const;
37 std::vector<Method> getMethods() const;
38 Method getMethod(const SymChar &name) const; ///< exception if not found
39 const bool isRefinedSolverVar() const; ///< is this type a refinement of solver_var?
40 const bool isRefinedAtom() const;
41 const bool isRefinedReal() const;
42 const bool isRefinedConstant() const;
43 const bool isFundamental() const;
44 const bool isModel() const;
45 const bool hasParameters() const;
46
47 Module getModule() const;
48
49 bool operator<(const Type &other) const;
50 };
51
52 #endif

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