WorkerBase.h

00001 //---------------------------------------------------------------------------
00002 
00003 #ifndef WorkerBaseH
00004 #define WorkerBaseH
00005 
00006 #include <xercesc/dom/DOM.hpp>
00007 #include <xercesc/util/XMLString.hpp>
00008 #include "Messages.h"
00009 #include "Constants.h"
00010 #include "DataTypes.h"
00011 
00012 class clSimManager;
00013 using namespace xercesc;
00014 
00039 class clWorkerBase {
00040 
00041   public:
00042 
00047   int GetObjectVersion() {return 1;};
00048 
00054   clWorkerBase(clSimManager *p_oSimManager);
00055 
00059   virtual ~clWorkerBase();
00060 
00066   char* GetName() {return m_cNameString;};
00067 
00074   void DoObjectSetup(xercesc::DOMDocument *p_oDoc, fileType iFileType);
00075 
00080   virtual void TimestepCleanup(){;};
00081 
00086   virtual void EndOfRunCleanup(){;};
00087 
00095   virtual void DoCommand(char *cCommand, char *cArguments) {;};
00096 
00097 //
00098 //  For commands that have been registered by objects, this asks for online
00099 //  help to be written.  The single argument is the command name.
00100 //  virtual void WriteCommandHelp(char *cCommand){;};
00101 
00102   protected:
00103   char m_cNameString[MAX_NAMESTRING_SIZE]; 
00104   static clSimManager *mp_oSimManager; 
00106   int *mp_iAllowedFileTypes; 
00107   int m_iNumAllowedTypes; 
00114   virtual void GetData(xercesc::DOMDocument *p_oDoc) = 0;
00115 
00131   void AssembleFileCode(int iFileType, int iFileVersion, char *cCode);
00132 };
00133 clSimManager *clWorkerBase::mp_oSimManager = NULL;
00134 //---------------------------------------------------------------------------
00135 #endif

Generated on Thu Jan 26 13:44:36 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.6-NO