MAK RTIspy API Documentation for HLA 1.3
intRegSetMsg.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2001 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: intRegSetMsg.h,v $ $Revision: 1.15 $ $State: Exp $
00007 *********************************************************************/
00008 
00011 
00012 #ifndef DtInterRegSetMsg_H_
00013 #define DtInterRegSetMsg_H_
00014 #ifdef DDM
00015 
00016 #include "rtiMsg.h"
00017 #include "netIntRegMsg.h"
00018 #include <vlutil/vlInetAddr.h>
00019 
00020 
00021 class DtRegionSet;
00022 class DtConnectionMgr;
00023 class DtInterRegSetMsg;
00024 
00025 enum DtInterRegSetType
00026 {
00027    DtInterPubRegSet,
00028    DtInterSubRegSet
00029 };
00030 
00031 typedef void (*DtInterRegSetCb)(const DtInterRegSetMsg& msg, void* usr);
00032 
00033 class DT_DLL_LRC DtInterRegSetMsg : public DtRtiMsg
00034 {
00035 public:
00036 
00038    DtInterRegSetMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00039 
00041    DtInterRegSetMsg(DtInterRegSetType type,
00042       const DtRegionSet &regionSet,
00043       DtInteractionClassHandle classHandleValue,
00044       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00045 
00047    DtInterRegSetMsg(const DtNetInterRegSetMsg* netRepMsg,
00048       DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00049 
00051    virtual ~DtInterRegSetMsg();
00052 
00054    virtual DtRtiMsg* clone(bool copy = true) const; 
00055 
00057    virtual void set(DtInterRegSetType type,
00058       const DtRegionSet &regionSet,
00059       DtInteractionClassHandle classHandleValue);
00060 
00062    virtual void setRegionSetType(DtInterRegSetType type);
00063    virtual DtInterRegSetType regionSetType() const;
00064 
00066    virtual void setRegionSetHandle(DtRegionHandle handleValue);
00067    virtual DtRegionHandle regionSetHandle() const;
00068 
00070    virtual void setClassHandle(DtInteractionClassHandle handleValue);
00071    virtual DtInteractionClassHandle classHandle() const;
00072 
00074    virtual void setAddress(const MAKRti::DtInetAddr& addressValue);
00075    virtual MAKRti::DtInetAddr address() const;
00076 
00078    virtual unsigned long numberRegions() const;      
00079    
00081    virtual const DtRegionHandle* regions() const;
00082 
00084    virtual void reserveRegionSlots(unsigned long numberRegions);
00085 
00087    virtual void addRegion(DtRegionHandle handleValue);
00088 
00090    virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
00091 
00092 public:
00094    static DtRtiMsg* create(const DtNetMsgHeader* initial, 
00095                    DtBufferPtr buffer);
00096 
00098    static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
00099 
00100    static void addCallback(DtConnectionMgr *conn, 
00101                   DtInterRegSetCb cb, void *usr);
00102 
00103    static void removeCallback(DtConnectionMgr *conn, 
00104                      DtInterRegSetCb cb, void *usr);
00105 
00106 protected:
00107    
00109    virtual DtNetU32* netRegions();
00110 
00112    virtual DtNetInterRegSetMsg* netIntRegSetMsg();
00113    virtual const DtNetInterRegSetMsg* netIntRegSetMsg() const;
00114 
00116    virtual DtRtiMsgKind internalDtRtiMsgKind();
00117 
00119    virtual int minSize() const;
00120 
00122    virtual DtInterRegSetMsg* self() const;
00123 
00124 protected:
00125    unsigned long myRegionCount;
00126    unsigned long myReservedSlotCount;
00127    DtRegionHandle* myRegions;
00128    bool myDirty;
00129 };
00130 
00131 
00132 inline DtInterRegSetMsg* DtInterRegSetMsg::self() const
00133 {
00134    return const_cast<DtInterRegSetMsg*>( this );
00135 }
00136 
00137 #endif
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)