![]() |
MAK RTIspy API Documentation for HLA 1.3
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: pubInterMsg.h,v $ $Revision: 1.14 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtPubInterMsg_H_ 00013 #define DtPubInterMsg_H_ 00014 00015 #include "rtiMsg.h" 00016 #include "netPubIntMsg.h" 00017 00018 class DtConnectionMgr; 00019 class DtPubInterMsg; 00020 typedef void (*DtPubInterCb)(const DtPubInterMsg& inter, void* usr); 00021 00022 class DT_DLL_LRC DtPubInterMsg : public DtRtiMsg 00023 { 00024 public: 00025 00027 DtPubInterMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00028 00029 DtPubInterMsg( 00030 DtInteractionClassHandle theInter, 00031 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00032 00034 DtPubInterMsg(const DtNetPubInterMsg* netRepMsg, 00035 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00036 00038 virtual ~DtPubInterMsg(); 00039 00041 virtual DtRtiMsg* clone(bool copy = true) const; 00042 00044 virtual void set(DtInteractionClassHandle theInter); 00045 00047 virtual void setHandle(DtInteractionClassHandle hand); 00048 virtual DtInteractionClassHandle handle() const; 00049 00051 virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const; 00052 00053 public: 00054 00056 static DtRtiMsg* create(const DtNetMsgHeader* initial, 00057 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00058 00060 static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00061 00063 static void addCallback(DtConnectionMgr* conn, 00064 DtPubInterCb cb, void* usr); 00065 static void removeCallback(DtConnectionMgr* conn, 00066 DtPubInterCb cb, void* usr); 00067 00068 protected: 00069 00071 virtual DtNetPubInterMsg* netPubInterMsg(); 00072 virtual const DtNetPubInterMsg* netPubInterMsg() const; 00073 00075 virtual DtRtiMsgKind internalDtRtiMsgKind(); 00076 00078 virtual int minSize() const; 00079 00081 virtual DtPubInterMsg* self() const; 00082 }; 00083 00084 00085 inline DtPubInterMsg* DtPubInterMsg::self() const 00086 { 00087 return const_cast<DtPubInterMsg*>( this ); 00088 } 00089 00090 #endif 00091