00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _CELL_H
00011 #define _CELL_H
00012
00013 class Cell
00014 {
00015 private:
00016 struct MethodInfo
00017 {
00018 MethodInfo()
00019 {
00020 ;
00021 }
00022
00023 MethodInfo( string v1, int v2, int v3 ):
00024 description( v1 ),
00025 isVariableDt( v2 ),
00026 isImplicit( v3 )
00027 {
00028 ;
00029 }
00030
00031 string description;
00032 int isVariableDt;
00033 int isImplicit;
00034 };
00035
00036 public:
00037 Cell();
00038
00039 void setupf( Id cell );
00040 Id getSetup() const;
00041
00042 void setMethod( string value );
00043 string getMethod() const;
00044
00045 void setSolverClock( unsigned int value );
00046 unsigned int getSolverClock() const;
00047
00048 void setSolverName( string value );
00049 string getSolverName() const;
00050
00051
00052 int getVariableDt() const;
00053 int getImplicit() const;
00054 string getDescription() const;
00055
00056 void processDummy( const Eref& e, ProcPtr p );
00057 void reinit( const Eref& e, ProcPtr p );
00058
00059
00060 static void addMethod(
00061 const string& name,
00062 const string& description,
00063 int isVariableDt,
00064 int isImplicit );
00065
00066 static const Cinfo* initCinfo();
00067
00068 private:
00069 void setupSolver( Id cell, Id seed ) const;
00070
00071 string method_;
00072 unsigned int solverClock_;
00073 string solverName_;
00074 Shell* shell_;
00075
00076 static vector< Id > children( Id obj );
00077 static Id findCompt( Id cell );
00078
00079 static map< string, MethodInfo > methodMap_;
00080 };
00081
00082 #endif // _CELL_H