MAK Data Logger API Documentation for DIS
baseIntDesc1516.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef baseIntDesc1516_H_
11 #define baseIntDesc1516_H_
12 
13 #if DtHLA
14 #if DtHLA_1516
15 
16 #include "lgrSim.h"
17 
18 #include "baseHla1516Class.h"
19 #include "baseParam.h"
20 
21 #include <vl/rtiCompatibility.h>
22 #include <vl/rtiNamespace.h>
23 
24 class DtString;
25 class DtInterClassDesc;
26 
27 namespace MAKLogger
28 {
29  class DtLgrOnlineFomDesc;
30 
33  class DT_DLL_LGRSIM DtBaseInterClassDesc : public DtBaseHla1516Class<DtBaseParamDesc>
34  {
35  public:
38  DtBaseInterClassDesc( const DtString& className,
39  DtBaseInterClassDesc* baseClass, DtLgrHlaHandle handle,
40  const void* handCode, int codeSize );
41 
44  DtBaseInterClassDesc( const DtString& className,
45  const DtString& baseClassName, DtLgrHlaHandle hand,
46  const void* handCode, int codeSize );
47 
49  DtBaseInterClassDesc( char*& bfr, int& bsz );
50 
52  virtual ~DtBaseInterClassDesc();
53 
55  DtBaseInterClassDesc( const DtBaseInterClassDesc& src );
56 
58  DtBaseInterClassDesc& operator=( const DtBaseInterClassDesc& src );
59 
61  RTI::InteractionClassHandle rtiHandle(const DtLgrOnlineFomDesc& fomDesc) const;
62 
64  inline bool isBaseClass() const;
65 
67  inline void setIsBaseClass(bool);
68 
70  inline bool isSubscribedTo() const;
71 
73  inline void setIsSubscribedTo( bool onOff );
74 
76  inline bool isFilteredClass() const;
77 
79  inline void setIsFilteredClass( bool onOff );
80 
83  inline DtLgrFomTransportType transportType() const;
84 
86  inline void setTransportType(DtLgrFomTransportType type);
87 
90  inline DtLgrFomOrderType orderType() const;
91 
93  inline void setOrderType(DtLgrFomOrderType type);
94 
95 
107  int serialize( char*& bfr, int& bsz ) const;
108 
109  protected:
111  void resetAll();
112  int unserializeParameters( char* bfr, int bsz, int num );
113 
114  };
115 
116  inline bool DtBaseInterClassDesc::isBaseClass() const
117  {
118  return ( ( flags() & DtLgrFomDesc_IsBaseClass ) != 0 );
119  }
120 
121  inline void DtBaseInterClassDesc::setIsBaseClass(bool isBaseClass)
122  {
123  if(isBaseClass)
124  {
125  setFlags(flags() | DtLgrFomDesc_IsBaseClass);
126  }
127  else
128  {
129  setFlags(flags() & ~DtLgrFomDesc_IsBaseClass);
130  }
131  }
132 
133 
134  inline bool DtBaseInterClassDesc::isSubscribedTo() const
135  {
136  return ( ( flags() & DtLgrFomDesc_IsSubscribed ) != 0 );
137  }
138 
139 
140  inline void DtBaseInterClassDesc::setIsSubscribedTo( bool onOff )
141  {
142  if(onOff)
143  {
144  setFlags(flags() | DtLgrFomDesc_IsSubscribed);
145  }
146  else
147  {
148  setFlags(flags() & ~DtLgrFomDesc_IsSubscribed);
149  }
150  }
151 
152 
153  inline bool DtBaseInterClassDesc::isFilteredClass() const
154  {
155  return ( ( flags() & DtLgrFomDesc_IsFiltered ) != 0 );
156  }
157 
158 
159  inline void DtBaseInterClassDesc::setIsFilteredClass( bool onOff )
160  {
161  if(onOff)
162  {
163  setFlags(flags() | DtLgrFomDesc_IsFiltered);
164  }
165  else
166  {
167  setFlags(flags() & ~DtLgrFomDesc_IsFiltered);
168  }
169  }
170 
171 
172  inline DtLgrFomTransportType DtBaseInterClassDesc::transportType() const
173  {
174  if ( ( flags() & DtLgrFomDesc_Reliable ) != 0 )
175  {
176  return DtLgr_Reliable;
177  }
178  else
179  {
180  return DtLgr_BestEffort;
181  }
182  }
183 
184  inline void DtBaseInterClassDesc::setTransportType(DtLgrFomTransportType type)
185  {
186  if(type == DtLgr_Reliable)
187  {
188  setFlags(flags() | DtLgrFomDesc_Reliable);
189  }
190  else
191  {
192  setFlags(flags() & ~DtLgrFomDesc_Reliable);
193  }
194  }
195 
196  inline DtLgrFomOrderType DtBaseInterClassDesc::orderType() const
197  {
198  if ( ( flags() & DtLgrFomDesc_TimeStamp ) != 0 )
199  {
200  return DtLgr_TimeStamp;
201  }
202  else
203  {
204  return DtLgr_Receive;
205  }
206  }
207 
208  inline void DtBaseInterClassDesc::setOrderType(DtLgrFomOrderType type)
209  {
210  if(type == DtLgr_TimeStamp)
211  {
212  setFlags(flags() | DtLgrFomDesc_TimeStamp);
213  }
214  else
215  {
216  setFlags(flags() & ~DtLgrFomDesc_TimeStamp);
217  }
218  }
219 
220 }
221 
222 #endif
223 #endif
224 
225 #endif

Document ID: Generated on Sun Dec 15 18:04:30 EST 2013 from SVN revision 134418
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)