00001 #ifndef _MY_FlashCompositional_ 00002 #define _MY_FlashCompositional_ 00003 #include "transportbase.h" 00004 #include "dynamicbase.h" 00005 #include "flashdata.h" 00006 #include "flashdataarray.h" 00007 00008 00026 class FlashBase 00027 { 00028 private: 00029 DynamicBase *m_pDyn; 00030 TransportBase *m_pTrans; 00031 protected: 00032 unsigned n_components,n_phases; 00033 FlashBase(unsigned n_phases,unsigned n_components); 00034 public: 00035 00036 00037 00038 virtual void execute()=0;//Compute the flash in all cells 00039 virtual void printOutput()=0; 00040 00041 virtual ~FlashBase(){} 00042 00043 00044 //Get Set methods 00045 void setTransport(TransportBase &trans){m_pTrans=&trans;} 00046 void setDynamic(DynamicBase &dyn){m_pDyn=&dyn;} 00047 DynamicBase& getDynamicModule(){assert(m_pDyn);return *m_pDyn;} 00048 TransportBase& getTransportModule(){assert(m_pTrans);return *m_pTrans;} 00049 00050 //Number of phases and components 00051 unsigned numComponents(){return n_components;} 00052 unsigned numPhases(){return n_phases;} 00053 00054 00055 }; 00056 00057 #endif