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

Contents of /trunk/pygtk/type.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 900 - (show annotations) (download) (as text)
Wed Oct 25 06:03:04 2006 UTC (13 years, 11 months ago) by johnpye
File MIME type: text/x-chdr
File size: 1428 byte(s)
The 'sim' object is correctly accessible from script methods now, even if run during on_load.
Added 'getSimulation' to registry.cpp, added 'runDefaultMethod' to Simulation, added 'getMethod' to Type.
Running of 'on_load' is instigated at the Python level now, so that relevent python variables are set at simulations are built, etc. This appears to have cause some changes to the way the solver behaves, possibly.
Added SearchProcList to exports in libascend.

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
38 public:
39 Type();
40 Type(const TypeDescription *t);
41 const SymChar getName() const;
42 const int getParameterCount() const;
43 const TypeDescription *getInternalType() const;
44 Simulation getSimulation(SymChar name);
45 const Dimensions getDimensions() const;
46 std::vector<Method> getMethods() const;
47 Method getMethod(const SymChar &) const; ///< exception if not found
48 const bool isRefinedSolverVar() const; ///< is this type a refinement of solver_var?
49 const bool isRefinedAtom() const;
50 const bool isRefinedReal() const;
51 const bool isRefinedConstant() const;
52 const bool isModel() const;
53 const bool hasParameters() const;
54 };
55
56 #endif

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