MAK RTIspy API Documentation for HLA 1.3
aHandValSet.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: aHandValSet.h,v $ $Revision: 1.17 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtAhvps_H_
13 #define DtAhvps_H_
14 
15 #include "rtiMsConfig.h"
16 #include <memory>
17 #include <vector>
18 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
19 #include "RTI/RTI1516.h"
20 #else
21 #ifdef DtIFSPEC13DLC
22 #include "RTI13.h"
23 #else
24 #include "RTI.hh"
25 #endif
26 #endif
27 #include "internalTypes.h"
28 
29 class DtObjectClassInfo;
30 
31 #ifdef DtIFSPEC1516
32 
33 class DT_DLL_LRC DtAhvps
34 {
35 public:
36 
38  DtAhvps(rti1516::AttributeHandleValueMap* ahvpm_i);
39 
41  virtual ~DtAhvps();
42 
43  virtual MAKRti::DtU32 size() const;
44 
45  virtual DtHandle getHandle(MAKRti::DtU32 i) const;
46 
47  virtual MAKRti::DtU32 getValueLength(MAKRti::DtU32 i) const;
48 
49  virtual void getValue(MAKRti::DtU32 i, char *buff,
50  MAKRti::DtU32& valueLength) const;
51 
52  virtual char *getValuePointer(MAKRti::DtU32 i,
53  MAKRti::DtU32& valueLength) const;
54 
55  virtual unsigned long getTransportType( MAKRti::DtU32 i) const;
56 
57  virtual unsigned long getOrderType( MAKRti::DtU32 i) const;
58 
59  virtual void print(DtObjectClassInfo* fomClass) const;
60 
61  virtual void add(DtAttributeHandle h, const char *buff,
62  MAKRti::DtU32 valueLength);
63 
64  virtual void addPointer(DtAttributeHandle h, void const* buff,
65  MAKRti::DtU32 valueLength);
66 
67  virtual void remove(DtAttributeHandle h);
68 
69  virtual void moveFrom(DtAhvps& ahvp, MAKRti::DtU32 &i);
70 
71  virtual void empty();
72 
73  virtual MAKRti::DtU32 start() const;
74  virtual MAKRti::DtU32 valid(MAKRti::DtU32 i) const;
75  virtual MAKRti::DtU32 next(MAKRti::DtU32 i) const;
76 
77  virtual rti1516::AttributeHandleValueMap::const_iterator
78  getConstIterator(MAKRti::DtU32 i) const;
79  virtual rti1516::AttributeHandleValueMap::iterator
80  getIterator(MAKRti::DtU32 i);
81 
82  virtual void print() const;
83 
84  virtual rti1516::AttributeHandleValueMap* getImplementation() const;
85 
87  virtual void setChannel(unsigned long channelValue);
88  virtual unsigned long channel() const;
89 
91  virtual void setTransportType(unsigned long type);
92  virtual unsigned long transportType() const;
93 
95  virtual void setOrderType(unsigned long type);
96  virtual unsigned long orderType() const;
97 
99  virtual void setOffset(MAKRti::DtU32 offset);
100  virtual void setMinOffset(MAKRti::DtU32 offset);
101  virtual MAKRti::DtU32 offset(void) const ;
102 
103 public:
104  static void setDefaultChannel(unsigned long defaultChannelValue);
105  static unsigned long defaultChannel();
106 
107 private:
109  DtAhvps();
110 
112  void buildAhvpCache() const;
113 
115  void invalidateAhvpCache() const;
116 
118  bool testInvariant() const;
119 
120 protected:
121  typedef std::vector< rti1516::AttributeHandleValueMap::iterator >
122  DtAhvpmIteratorList;
123 
124  static unsigned long theDefaultChannel;
125  unsigned long myChannel;
126 
127 
129 
132  mutable DtAhvpmIteratorList myAhvpByIndexCache;
133  mutable bool myAhvpByIndexCacheIsInvalid;
134 
135  unsigned long myTransportType;
136  unsigned long myOrderType;
137 
139  MAKRti::DtU32 myUpdateRateOffset;
140 };
141 
142 #elif defined(DtIFSPEC1516E)
143 class DT_DLL_LRC DtAhvps
144 {
145 public:
146 
148  DtAhvps(rti1516e::AttributeHandleValueMap* ahvpm_i);
149 
151  virtual ~DtAhvps();
152 
153  virtual MAKRti::DtU32 size() const;
154 
155  virtual DtHandle getHandle(MAKRti::DtU32 i) const;
156 
157  virtual MAKRti::DtU32 getValueLength(MAKRti::DtU32 i) const;
158 
159  virtual void getValue(MAKRti::DtU32 i, char *buff,
160  MAKRti::DtU32& valueLength) const;
161 
162  virtual char *getValuePointer(MAKRti::DtU32 i,
163  MAKRti::DtU32& valueLength) const;
164 
165  virtual unsigned long getTransportType( MAKRti::DtU32 i) const;
166 
167  virtual unsigned long getOrderType( MAKRti::DtU32 i) const;
168 
169  virtual void print(DtObjectClassInfo* fomClass) const;
170 
171  virtual void add(DtAttributeHandle h, const char *buff,
172  MAKRti::DtU32 valueLength);
173 
174  virtual void addPointer(DtAttributeHandle h, void const* buff,
175  MAKRti::DtU32 valueLength);
176 
177  virtual void remove(DtAttributeHandle h);
178 
179  virtual void moveFrom(DtAhvps& ahvp, MAKRti::DtU32 &i);
180 
181  virtual void empty();
182 
183  virtual MAKRti::DtU32 start() const;
184  virtual MAKRti::DtU32 valid(MAKRti::DtU32 i) const;
185  virtual MAKRti::DtU32 next(MAKRti::DtU32 i) const;
186 
187  virtual rti1516e::AttributeHandleValueMap::const_iterator
188  getConstIterator(MAKRti::DtU32 i) const;
189  virtual rti1516e::AttributeHandleValueMap::iterator
190  getIterator(MAKRti::DtU32 i);
191 
192  virtual void print() const;
193 
194  virtual rti1516e::AttributeHandleValueMap* getImplementation() const;
195 
197  virtual void setChannel(unsigned long channelValue);
198  virtual unsigned long channel() const;
199 
201  virtual void setTransportType(unsigned long type);
202  virtual unsigned long transportType() const;
203 
205  virtual void setOrderType(unsigned long type);
206  virtual unsigned long orderType() const;
207 
209  virtual void setOffset(MAKRti::DtU32 offset);
210  virtual void setMinOffset(MAKRti::DtU32 offset);
211  virtual MAKRti::DtU32 offset(void) const ;
212 
213 public:
214  static void setDefaultChannel(unsigned long defaultChannelValue);
215  static unsigned long defaultChannel();
216 
217 private:
219  DtAhvps();
220 
222  void buildAhvpCache() const;
223 
225  void invalidateAhvpCache() const;
226 
228  bool testInvariant() const;
229 
230 protected:
231  typedef std::vector< rti1516e::AttributeHandleValueMap::iterator >
232  DtAhvpmIteratorList;
233 
234  static unsigned long theDefaultChannel;
235  unsigned long myChannel;
236 
237 
239 
242  mutable DtAhvpmIteratorList myAhvpByIndexCache;
243  mutable bool myAhvpByIndexCacheIsInvalid;
244 
245  unsigned long myTransportType;
246  unsigned long myOrderType;
247 
249  MAKRti::DtU32 myUpdateRateOffset;
250 };
251 
252 #else
253 
254 #define DtHvps DtAhvps
255 #define HandleValuePairSet AttributeHandleValuePairSet
256 #define DtDEFINING_AHVPS 1
257 
258 #include "handleValSet.h"
259 
260 #undef DtHvps
261 #undef HandleValuePairSet
262 #undef DtDEFINING_AHVPS
263 
264 #endif
265 
266 #endif

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)