![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: pubObjMsg.h,v $ $Revision: 1.15 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtPubObjMsg_H_ 00013 #define DtPubObjMsg_H_ 00014 00015 #include "rtiMsg.h" 00016 #include "netPubObjMsg.h" 00017 #include "attrHandSet.h" 00018 00019 class DtAttributeHandleSet; 00020 class DtConnectionMgr; 00021 class DtPubObjMsg; 00022 typedef void (*DtPubObjCb)(const DtPubObjMsg& inter, void* usr); 00023 00024 class DT_DLL_LRC DtPubObjMsg : public DtRtiMsg 00025 { 00026 public: 00027 00029 DtPubObjMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00030 00031 DtPubObjMsg( 00032 DtObjectClassHandle theObj, 00033 const DtAttributeHandleSet& theSet, 00034 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00035 00037 DtPubObjMsg(const DtNetPubObjMsg* netRepMsg, 00038 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00039 00041 virtual ~DtPubObjMsg(); 00042 00044 virtual DtRtiMsg* clone(bool copy = true) const; 00045 00047 virtual void set( 00048 DtObjectClassHandle theObj, 00049 const DtAttributeHandleSet& theSet); 00050 00052 virtual void setObjectClassHandle(DtObjectClassHandle hand); 00053 virtual DtObjectClassHandle objectClassHandle() const; 00054 00056 virtual void setAttrHandles(const DtAttributeHandleSet& attrs); 00057 virtual const DtAttributeHandleSet& attrHandles() const; 00058 00060 virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const; 00061 00062 public: 00063 00065 static DtRtiMsg* create(const DtNetMsgHeader* initial, 00066 DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00067 00069 static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER); 00070 00072 static void addCallback(DtConnectionMgr* conn, 00073 DtPubObjCb cb, void* usr); 00074 static void removeCallback(DtConnectionMgr* conn, 00075 DtPubObjCb cb, void* usr); 00076 00077 protected: 00078 00080 virtual DtNetPubObjMsg* netPubObjMsg(); 00081 virtual const DtNetPubObjMsg* netPubObjMsg() const; 00082 00084 virtual DtRtiMsgKind internalDtRtiMsgKind(); 00085 00087 virtual int minSize() const; 00088 00090 virtual DtPubObjMsg* self() const; 00091 00092 protected: 00093 00094 int myDirty; 00095 DtAttributeHandleSet* myAttrs; 00096 }; 00097 00098 00099 inline DtPubObjMsg* DtPubObjMsg::self() const 00100 { 00101 return const_cast<DtPubObjMsg*>( this ); 00102 } 00103 00104 #endif 00105