![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: unpubObjMsg.h,v $ $Revision: 1.15 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtUnpubObjMsg_H_ 00013 #define DtUnpubObjMsg_H_ 00014 00015 #include "rtiMsg.h" 00016 #include "netUnPObjMsg.h" 00017 00018 class DtConnectionMgr; 00019 class DtUnpubObjMsg; 00020 class DtAttributeHandleSet; 00021 typedef void (*DtUnpubObjCb)(const DtUnpubObjMsg& inter, void* usr); 00022 00023 class DT_DLL_LRC DtUnpubObjMsg : public DtRtiMsg 00024 { 00025 public: 00026 00028 DtUnpubObjMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00029 00030 DtUnpubObjMsg( 00031 DtObjectClassHandle theObj, 00032 const DtAttributeHandleSet& theSet, 00033 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00034 00036 DtUnpubObjMsg(const DtNetUnpubObjMsg* netRepMsg, 00037 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00038 00040 virtual ~DtUnpubObjMsg(); 00041 00043 virtual DtRtiMsg* clone(bool copy = true) const; 00044 00046 virtual void set(DtObjectClassHandle theObj, 00047 const DtAttributeHandleSet& theSet); 00048 00050 virtual void setObjectClassHandle(DtObjectClassHandle hand); 00051 virtual DtObjectClassHandle objectClassHandle() const; 00052 00054 virtual void setAttrHandles(const DtAttributeHandleSet& attrs); 00055 virtual const DtAttributeHandleSet& attrHandles() const; 00056 00058 virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const; 00059 00060 public: 00061 00063 static DtRtiMsg* create(const DtNetMsgHeader* initial, 00064 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00065 00067 static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00068 00070 static void addCallback(DtConnectionMgr* conn, 00071 DtUnpubObjCb cb, void* usr); 00072 static void removeCallback(DtConnectionMgr* conn, 00073 DtUnpubObjCb cb, void* usr); 00074 00075 protected: 00076 00078 virtual DtNetUnpubObjMsg* netUnpubObjMsg(); 00079 virtual const DtNetUnpubObjMsg* netUnpubObjMsg() const; 00080 00082 virtual DtRtiMsgKind internalDtRtiMsgKind(); 00083 00085 virtual int minSize() const; 00086 00088 virtual DtUnpubObjMsg* self() const; 00089 00090 protected: 00091 00092 int myDirty; 00093 DtAttributeHandleSet* myAttrs; 00094 }; 00095 00096 00097 inline DtUnpubObjMsg* DtUnpubObjMsg::self() const 00098 { 00099 return const_cast<DtUnpubObjMsg*>( this ); 00100 } 00101 00102 #endif 00103