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

Contents of /trunk/pygtk/type.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1727 - (show annotations) (download) (as text)
Tue Jan 15 23:03:20 2008 UTC (16 years, 5 months ago) by jpye
File MIME type: text/x-chdr
File size: 1290 byte(s)
Updated cavity to current CLFR design Stage 2.
Added 'singletube' model to tubebank.
Improved functionality of the Module view in PyGTK GUI (corrected highlighting of instantiable types, enabled doubleclick expansion of module type list).
Added reporting of inline notes via console output (TODO: incorporate this into the GUI).
Added Type::isModel and corrected Type::hasParameters (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 <compiler/type_desc.h>
10 }
11
12 class Simulation;
13
14 #include "symchar.h"
15 #include "method.h"
16 #include "dimensions.h"
17
18 /**
19 A model type as loaded from an ASCEND a4c file. For example, a type
20 might be a 'test_controller' from the simple_fs.a4l example file.
21
22 Once you have a type, you can create an instance of it (getInstance)
23 which will then allow you to start on solving it.
24 */
25 class Type{
26 private:
27 const TypeDescription *t;
28 public:
29 Type();
30 Type(const TypeDescription *t);
31 const SymChar getName() const;
32 const int getParameterCount() const;
33 const TypeDescription *getInternalType() const;
34 Simulation getSimulation(const SymChar &name="sim", const bool &rundefaultmethod=true);
35 const Dimensions getDimensions() const;
36 std::vector<Method> getMethods() const;
37 Method getMethod(const SymChar &name) const; ///< exception if not found
38 const bool isRefinedSolverVar() const; ///< is this type a refinement of solver_var?
39 const bool isRefinedAtom() const;
40 const bool isRefinedReal() const;
41 const bool isRefinedConstant() const;
42 const bool isFundamental() const;
43 const bool isModel() const;
44 const bool hasParameters() const;
45
46 bool operator<(const Type &other) const;
47 };
48
49 #endif

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