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

Contents of /trunk/pygtk/type.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1046 - (show annotations) (download) (as text)
Fri Jan 5 11:15:16 2007 UTC (13 years, 7 months ago) by johnpye
File MIME type: text/x-chdr
File size: 1450 byte(s)
Several changes to get BinToken compilation active again from PyGTK interface. Still not working but the problems now are in the C layer.
Tidied doc for slvDOF.h
Changed BinTokenSetOptions to saner use of strings -- no more 'taking ownership' of char arrays passed.
Added Compiler.use_binary_compilation option in PyGTK GUI.
Moved all the bintoken stuff out of class Type and into Compiler, where it should be (C++).
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 <utilities/ascConfig.h>
10 #include <compiler/fractions.h>
11 #include <compiler/compiler.h>
12 #include <compiler/dimen.h>
13 #include <compiler/child.h>
14 #include <general/list.h>
15 #include <compiler/module.h>
16 #include <compiler/childinfo.h>
17 #include <compiler/slist.h>
18 #include <compiler/type_desc.h>
19 }
20
21 class Simulation;
22
23 #include "symchar.h"
24 #include "method.h"
25 #include "dimensions.h"
26
27 /**
28 A model type as loaded from an ASCEND a4c file. For example, a type
29 might be a 'test_controller' from the simple_fs.a4l example file.
30
31 Once you have a type, you can create an instance of it (getInstance)
32 which will then allow you to start on solving it.
33 */
34 class Type{
35 private:
36 const TypeDescription *t;
37 public:
38 Type();
39 Type(const TypeDescription *t);
40 const SymChar getName() const;
41 const int getParameterCount() const;
42 const TypeDescription *getInternalType() const;
43 Simulation getSimulation(const SymChar &name="sim", const bool &rundefaultmethod=true);
44 const Dimensions getDimensions() const;
45 std::vector<Method> getMethods() const;
46 Method getMethod(const SymChar &name) const; ///< exception if not found
47 const bool isRefinedSolverVar() const; ///< is this type a refinement of solver_var?
48 const bool isRefinedAtom() const;
49 const bool isRefinedReal() const;
50 const bool isRefinedConstant() const;
51 const bool hasParameters() const;
52 };
53
54 #endif

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