![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: retractMsg.h,v $ $Revision: 1.7 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtRetractMsg_H_ 00013 #define DtRetractMsg_H_ 00014 00015 #ifdef DtTIME 00016 00017 #include "rtiMsg.h" 00018 #include "netRetractMsg.h" 00019 00020 class DtConnectionMgr; 00021 class DtRetractMsg; 00022 typedef void (*DtRetractCb)(const DtRetractMsg& msg, void* usr); 00023 00024 class DT_DLL_LRC DtRetractMsg : public DtRtiMsg 00025 { 00026 public: 00027 00029 DtRetractMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00030 00032 DtRetractMsg( 00033 unsigned long serialNumberVal, 00034 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00035 00037 DtRetractMsg(const DtNetRetractMsg* netRepMsg, 00038 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00039 00041 virtual ~DtRetractMsg(); 00042 00044 virtual DtRtiMsg* clone(bool copy = true) const; 00045 00047 virtual void set(unsigned long serialNumberVal); 00048 00050 virtual void setSerialNumber(unsigned long serialNumberVal); 00051 virtual unsigned long serialNumber() const; 00052 00054 virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const; 00055 00056 public: 00057 00059 static DtRtiMsg* create(const DtNetMsgHeader* initial, 00060 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00061 00063 static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00064 00066 static void addCallback(DtConnectionMgr *conn, 00067 DtRetractCb cb, void *usr); 00068 static void removeCallback(DtConnectionMgr *conn, 00069 DtRetractCb cb, void *usr); 00070 00071 protected: 00072 00074 virtual DtRtiMsgKind internalDtRtiMsgKind(); 00075 00077 virtual DtNetRetractMsg* netRetractMsg(); 00078 virtual const DtNetRetractMsg* netRetractMsg() const; 00079 00081 virtual int minSize() const; 00082 00084 virtual DtRetractMsg* self() const; 00085 00086 protected: 00088 }; 00089 00090 inline DtRetractMsg* DtRetractMsg::self() const 00091 { 00092 return const_cast<DtRetractMsg*>( this ); 00093 } 00094 00095 #endif 00096 #endif