![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2004 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: timeKeeperPSR.h,v $ $Revision: 1.2 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef DtTimeKeeperPSR_H_ 00010 #define DtTimeKeeperPSR_H_ 00011 00012 #include "vrfobjcore/processSR.h" 00013 #include "vrfutil/rwReal.h" 00014 00015 //class DtTimeKeeperPSR: 00016 // 00017 //This is a sample Process State Repository which has only one value 00018 //which is elapsed time. This data will be written to and read from 00019 //the OOB file when a scenario checkpoint is saved and loaded. 00020 00021 extern const char* TimeKeeperPSRType; 00022 00023 class DtTimeKeeperPSR : public DtVrfProcessStateRepository 00024 { 00025 public: 00026 00027 //constructor 00028 DtTimeKeeperPSR(DtVrfObject* vrfObject, 00029 const DtString& rwName = DtString::nullString(), 00030 DtReaderWriterRegistry* parentRegistry = 0); 00031 00032 //copy constructor 00033 DtTimeKeeperPSR(const DtTimeKeeperPSR& orig, 00034 const DtString& rwName = DtString::nullString(), 00035 DtReaderWriterRegistry* parentRegistry = 0); 00036 00037 //destructor 00038 virtual ~DtTimeKeeperPSR(); 00039 00040 //assignment operator 00041 DtTimeKeeperPSR& operator=(const DtTimeKeeperPSR& orig); 00042 00043 //returns a newly created copy of this object 00044 virtual DtVrfProcessStateRepository* clone( 00045 const DtString& rwName = DtString::nullString(), 00046 DtReaderWriterRegistry* parentRegistry = 0) const; 00047 00048 //Returns the string type of this process state repository. 00049 virtual DtString type() const; 00050 00051 //Get / Set the elapsed time state variable. 00052 virtual void setElapsedTime(double time); 00053 virtual double elapsedTime() const; 00054 00055 public: 00056 00057 //Returns a newly created instance of this class. 00058 static DtVrfProcessStateRepository* creator (const DtString& rwName, 00059 DtVrfObject* vrfObject, DtReaderWriterRegistry* parentRegistry); 00060 00061 protected: 00062 00063 DtRwReal myElapsedTime; 00064 }; 00065 00066 #endif