![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: saveTimeMsg.h,v $ $Revision: 1.8 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtSaveTimeMsg_H_ 00013 #define DtSaveTimeMsg_H_ 00014 00015 #include "saveMsg.h" 00016 00017 class DtConnectionMgr; 00018 class DtSaveTimeMsg; 00019 typedef void (*DtSaveTimeCb)(const DtSaveTimeMsg& msg, void* usr); 00020 00021 class DT_DLL_LRC DtSaveTimeMsg : public DtSaveMsg 00022 { 00023 public: 00024 00026 DtSaveTimeMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00027 00029 #ifdef DtIFSPEC1516 00030 DtSaveTimeMsg( 00031 const char* theLabel, 00032 rti1516::LogicalTime const & timeVal, 00033 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00034 #elif defined(DtIFSPEC1516E) 00035 DtSaveTimeMsg( 00036 const char* theLabel, 00037 rti1516e::LogicalTime const & timeVal, 00038 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00039 #else 00040 DtSaveTimeMsg( 00041 const char* theLabel, 00042 RTI::FedTime const & timeVal, 00043 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00044 #endif 00045 00047 DtSaveTimeMsg(const DtNetSaveMsg* netRepMsg, 00048 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00049 00051 virtual ~DtSaveTimeMsg(); 00052 00054 virtual DtRtiMsg* clone(bool copy = true) const; 00055 00057 #ifdef DtIFSPEC1516 00058 virtual void set(const char* theLabel, rti1516::LogicalTime const & timeVal); 00059 #elif defined(DtIFSPEC1516E) 00060 virtual void set(const char* theLabel, rti1516e::LogicalTime const & timeVal); 00061 #else 00062 virtual void set(const char* theLabel, RTI::FedTime const & timeVal); 00063 #endif 00064 00066 virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const; 00067 00068 00069 public: 00070 00072 static DtRtiMsg* create(const DtNetMsgHeader* initial, 00073 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00074 00076 static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00077 00079 static void addCallback(DtConnectionMgr *conn, 00080 DtSaveTimeCb cb, void *usr, bool isMomCallback=false); 00081 static void removeCallback(DtConnectionMgr *conn, 00082 DtSaveTimeCb cb, void *usr, bool isMomCallback=false); 00083 00084 protected: 00085 00087 virtual DtRtiMsgKind internalDtRtiMsgKind(); 00088 00089 protected: 00090 00091 }; 00092 00093 #endif