MAK RTIspy API Documentation for HLA 1516
intRegSetMsg.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: intRegSetMsg.h,v $ $Revision: 1.15 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtInterRegSetMsg_H_
13 #define DtInterRegSetMsg_H_
14 #ifdef DDM
15 
16 #include "rtiMsg.h"
17 #include "netIntRegMsg.h"
18 #include <vlutil/vlInetAddr.h>
19 
20 
21 class DtRegionSet;
22 class DtConnectionMgr;
23 class DtInterRegSetMsg;
24 
25 enum DtInterRegSetType
26 {
27  DtInterPubRegSet,
28  DtInterSubRegSet
29 };
30 
31 typedef void (*DtInterRegSetCb)(const DtInterRegSetMsg& msg, void* usr);
32 
33 class DT_DLL_LRC DtInterRegSetMsg : public DtRtiMsg
34 {
35 public:
36 
38  DtInterRegSetMsg(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
39 
41  DtInterRegSetMsg(DtInterRegSetType type,
42  const DtRegionSet &regionSet,
43  DtInteractionClassHandle classHandleValue,
44  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
45 
47  DtInterRegSetMsg(const DtNetInterRegSetMsg* netRepMsg,
48  DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
49 
51  virtual ~DtInterRegSetMsg();
52 
54  virtual DtRtiMsg* clone(bool copy = true) const;
55 
57  virtual void set(DtInterRegSetType type,
58  const DtRegionSet &regionSet,
59  DtInteractionClassHandle classHandleValue);
60 
62  virtual void setRegionSetType(DtInterRegSetType type);
63  virtual DtInterRegSetType regionSetType() const;
64 
66  virtual void setRegionSetHandle(DtRegionHandle handleValue);
67  virtual DtRegionHandle regionSetHandle() const;
68 
70  virtual void setClassHandle(DtInteractionClassHandle handleValue);
71  virtual DtInteractionClassHandle classHandle() const;
72 
74  virtual void setAddress(const MAKRti::DtInetAddr& addressValue);
75  virtual MAKRti::DtInetAddr address() const;
76 
78  virtual unsigned long numberRegions() const;
79 
81  virtual const DtRegionHandle* regions() const;
82 
84  virtual void reserveRegionSlots(unsigned long numberRegions);
85 
87  virtual void addRegion(DtRegionHandle handleValue);
88 
90  virtual void printData(DtLogicalTimeFactory* logicalTimeFactory) const;
91 
92 public:
94  static DtRtiMsg* create(const DtNetMsgHeader* initial,
95  DtBufferPtr buffer);
96 
98  static DtRtiMsg* create(DtBufferPtr buffer = DtUSE_INTERNAL_BUFFER);
99 
100  static void addCallback(DtConnectionMgr *conn,
101  DtInterRegSetCb cb, void *usr);
102 
103  static void removeCallback(DtConnectionMgr *conn,
104  DtInterRegSetCb cb, void *usr);
105 
106 protected:
107 
109  virtual DtNetU32* netRegions();
110 
112  virtual DtNetInterRegSetMsg* netIntRegSetMsg();
113  virtual const DtNetInterRegSetMsg* netIntRegSetMsg() const;
114 
117 
119  virtual int minSize() const;
120 
122  virtual DtInterRegSetMsg* self() const;
123 
124 protected:
125  unsigned long myRegionCount;
126  unsigned long myReservedSlotCount;
127  DtRegionHandle* myRegions;
128  bool myDirty;
129 };
130 
131 
132 inline DtInterRegSetMsg* DtInterRegSetMsg::self() const
133 {
134  return const_cast<DtInterRegSetMsg*>( this );
135 }
136 
137 #endif
138 #endif
139 

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)