MAK RTIspy API Documentation for HLA Evolved
updateRoMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1998 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: updateRoMsg.h,v $ $Revision: 1.12 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtUpdateRoMsg_H_
00013 #define DtUpdateRoMsg_H_
00014 
00015 #include "updateMsg.h"
00016 #include "netUpdateMsg.h"
00017 
00019 
00020 class DtConnectionMgr;
00021 
00022 class DT_DLL_LRC DtUpdateRoMsg : public DtUpdateMsg
00023 {
00024 public:
00025 
00027    DtUpdateRoMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00028 
00029    DtUpdateRoMsg(
00030       DtObjectInstanceHandle objHand, 
00031       const char* objName,
00032       DtObjectClassHandle classHand,
00033       const DtAhvps& theAttributes,
00034 #ifdef DtIFSPEC1516
00035       rti1516::VariableLengthData const& theTag,
00036 #elif defined(DtIFSPEC1516E)
00037       rti1516e::VariableLengthData const& theTag,
00038 #else
00039       char const * theTag,
00040 #endif
00041       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00042 
00043    DtUpdateRoMsg(const DtNetUpdateMsg* netRepMsg,
00044       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00045 
00047    virtual ~DtUpdateRoMsg();
00048 
00050    virtual DtRtiMsg* clone(bool copy = true) const; 
00051 
00053    virtual void set(
00054       DtObjectInstanceHandle objHand, 
00055       const char* objName,
00056       DtObjectClassHandle theClass, 
00057       const DtAhvps& theAttributes,
00058 #ifdef DtIFSPEC1516
00059       rti1516::VariableLengthData const& theTag);
00060 #elif defined(DtIFSPEC1516E)
00061       rti1516e::VariableLengthData const& theTag);
00062 #else
00063       char const * theTag);
00064 #endif
00065 
00067    virtual void setClassHandle(DtObjectClassHandle hand);
00068    virtual DtObjectClassHandle classHandle() const;
00069 
00071    virtual void setObjHandle(DtObjectInstanceHandle id);
00072    virtual DtObjectInstanceHandle objHandle() const;
00073 
00075    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00076 
00077 public:
00078 
00080    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00081    static DtRtiMsg* create(const DtNetMsgHeader* initial, 
00082       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);    
00083 
00085    static void addCallback(DtConnectionMgr *conn, DtUpdateCb cb, void *usr);
00086    static void removeCallback(DtConnectionMgr *conn, DtUpdateCb cb, void *usr);
00087 
00088 protected:
00089    
00091    virtual DtNetUpdateMsg* netUpdateRoMsg();
00092    virtual const DtNetUpdateMsg* netUpdateRoMsg() const;
00093 
00095    virtual DtRtiMsgKind internalDtRtiMsgKind();
00096 
00098    virtual int minSize(const DtAhvps* attrs=NULL,
00099       const char* objName=NULL,
00100 #ifdef DtIFSPEC1516
00101       rti1516::VariableLengthData const& theTag=theDefaultTag) const;
00102 #elif defined(DtIFSPEC1516E)
00103       rti1516e::VariableLengthData const& theTag=theDefaultTag) const;
00104 #else
00105       char const * theTag=theDefaultTag) const;
00106 #endif
00107 
00109    virtual void setNameSize(int size);
00110    virtual int nameSize() const;
00111 
00113    virtual void setTagSize(int size);
00114    virtual int tagSize() const;
00115 
00117    virtual DtNetAttrs* netAttrs();
00118    virtual DtNetBigAttrs* netBigAttrs();
00119 
00121    virtual DtNetU32* channelPtr() const;
00122 
00124    virtual char* namePtr();
00125 
00127    virtual char* tagPtr();
00128 
00130    virtual DtUpdateRoMsg* selfRo() const;
00131 };
00132 
00133 inline DtUpdateRoMsg* DtUpdateRoMsg::selfRo() const
00134 {
00135    return const_cast<DtUpdateRoMsg*>( this );
00136 }
00137 
00138 #endif
00139 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)