VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
reflectedObjectLists.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 #include <vl/reflectedEmitterSystemList.h>
10 #include <vl/reflectedObjectList.h>
12 #include <vl/reflectedActiveSonarList.h>
14 #include <vl/reflectedPropulsionNoiseList.h>
15 #include <vl/reflectedIffList.h>
19 #include <vl/reflectedDesignatorList.h>
20 #include <vl/reflectedPropulsionNoiseList.h>
21 #include <vl/reflectedRadioTransmitterList.h>
22 #include <vl/reflectedRadioReceiverList.h>
23 #include <vl/reflectedIffList.h>
24 
25 #include <vl/reflectedLandSurfaceList.h>
26 #include <vl/reflectedSubsurfaceLayerList.h>
27 #include <vl/reflectedWaterSurfaceList.h>
28 #include <vl/reflectedTroposphereLayerList.h>
29 #include <vl/reflectedTimeAndDateList.h>
30 #include <vl/reflectedWindCorridorList.h>
31 
32 #include <vl/reflectedAerodromeList.h>
33 
36 class DtReflectedActiveSonarList;
37 class DtReflectedPropulsionNoiseList;
38 class DtReflectedIffList;
42 class DtReflectedRadioReceiverList;
43 class DtExerciseConn;
44 
45 #if DtHLA
46 namespace makVrfVrlinkExtToolkit
47 {
48  class DtReflectedExtendedAttributesObjectList;
49 }
50 #endif
51 
52 namespace makVrf
53 {
55  {
56  DiscoveryCondition() : fcn(nullptr), userData(nullptr) {};
57  void clear() { fcn = nullptr; userData = nullptr; };
58  DtDiscoveryCondition fcn;
59  void* userData;
60  };
61 
62  template <typename T_ReflectedList>
64  {
66  const T_ReflectedList* operator ->() const { return reflectedList; };
68  bool createdLocally = false;
70 
72  {
73  public:
74  ReflectedObjectList(DtExerciseConn* exConn) : T_ReflectedList(exConn) {};
75 
76  DtDiscoveryCondition discoveryCondition() const { return T_ReflectedList::myDiscoveryCondition; };
77  void* discoveryConditionData() const { return T_ReflectedList::myDiscoveryConditionParameter; };
78  };
79 
80  void backup()
81  {
82  if (reflectedList)
83  {
84  existingDiscoveryCondition.fcn = ((ReflectedObjectList*)reflectedList)->discoveryCondition();
85  existingDiscoveryCondition.userData = ((ReflectedObjectList*)reflectedList)->discoveryConditionData();
86  }
87  }
88 
90  {
92  createdLocally = false;
93 
94  return *this;
95  }
96 
97  void create(DtExerciseConn* conn)
98  {
99  reflectedList = new T_ReflectedList(conn);
100  createdLocally = true;
101  }
102 
103  bool operator==(const DtReflectedListInformation& rhs) const
104  {
105  return ((rhs.createdLocally == createdLocally) &&
106  (rhs.reflectedList == reflectedList));
107  }
108 
109  bool operator!=(const DtReflectedListInformation& rhs) const
110  {
111  return !(*this == rhs);
112  }
113 
114  void cleanup()
115  {
116  if (createdLocally)
117  {
118  delete reflectedList;
119  reflectedList = nullptr;
120  createdLocally = false;
121  }
122  else if (reflectedList)
123  {
126  }
127  }
128 
129 #if DtDIS
130  void setTimeoutInterval(int timeout)
131  {
132  if (reflectedList)
133  {
134  reflectedList->setTimeoutInterval(timeout);
135  }
136  }
137 
138  void setTimeoutProcessing(bool b)
139  {
140  if (reflectedList)
141  {
142  reflectedList->setTimeoutProcessing(b);
143  }
144  }
145 #endif
146  };
147 
149  {
169  #if DtHLA
171  #endif
172 
173 #if DtDIS
174  void setTimeoutInterval(int timeout)
175  {
176  reflectedEntitiesList.setTimeoutInterval(timeout);
177  reflectedAerodromesList.setTimeoutInterval(timeout);
178  reflectedAggregatesList.setTimeoutInterval(timeout);
179  reflectedEnvironmentalsList.setTimeoutInterval(timeout);
180  reflectedDesignatorsList.setTimeoutInterval(timeout);
181  reflectedActiveSonarList.setTimeoutInterval(timeout);
182  reflectedPropulsionNoiseList.setTimeoutInterval(timeout);
183  reflectedRadioTransmitterList.setTimeoutInterval(timeout);
184  reflectedNavAidTransmitterList.setTimeoutInterval(timeout);
185  reflectedRadioReceiverList.setTimeoutInterval(timeout);
186  reflectedRadioReceiverList.setTimeoutInterval(timeout);
187  reflectedDynamicTerrainList.setTimeoutInterval(timeout);
188  reflectedIffList.setTimeoutInterval(timeout);
189  reflectedEmitterSystemList.setTimeoutInterval(timeout);
190  }
191 
193  {
194  reflectedEntitiesList.setTimeoutProcessing(!b);
195  reflectedAerodromesList.setTimeoutProcessing(!b);
196  reflectedAggregatesList.setTimeoutProcessing(!b);
197  reflectedEnvironmentalsList.setTimeoutProcessing(!b);
198  reflectedDesignatorsList.setTimeoutProcessing(!b);
199  reflectedActiveSonarList.setTimeoutProcessing(!b);
200  reflectedPropulsionNoiseList.setTimeoutProcessing(!b);
201  reflectedRadioTransmitterList.setTimeoutProcessing(!b);
202  reflectedNavAidTransmitterList.setTimeoutProcessing(!b);
203  reflectedRadioReceiverList.setTimeoutProcessing(!b);
204  reflectedRadioReceiverList.setTimeoutProcessing(!b);
205  reflectedDynamicTerrainList.setTimeoutProcessing(!b);
206  reflectedIffList.setTimeoutProcessing(!b);
207  reflectedEmitterSystemList.setTimeoutProcessing(!b);
208  }
209 #endif
210  };
211 }
Contains the DtReflectedExtEntityList class declaration.
DtReflectedListInformation< DtReflectedExtEntityList > reflectedEntitiesList
Definition: reflectedObjectLists.h:150
DtReflectedListInformation< DtReflectedTimeAndDateList > reflectedTimeAndDateList
Definition: reflectedObjectLists.h:167
DtReflectedListInformation< DtReflectedActiveSonarList > reflectedActiveSonarList
Definition: reflectedObjectLists.h:156
void cleanup()
Definition: reflectedObjectLists.h:114
ReflectedObjectList(DtExerciseConn *exConn)
Definition: reflectedObjectLists.h:74
This file provides a protocol independent include file for the class DtReflectedNavAidList.
DtReflectedListInformation< DtReflectedNavAidList > reflectedNavAidTransmitterList
Definition: reflectedObjectLists.h:159
T_ReflectedList * operator->()
Definition: reflectedObjectLists.h:65
DtReflectedListInformation< DtReflectedDesignatorList > reflectedDesignatorsList
Definition: reflectedObjectLists.h:155
Instances of this class provide a protocol independent interface to a list of DynamicTerrain in a DIS...
Definition: reflectedDynamicTerrainListDIS.h:24
This file provides a protocol independant include file for the class DtReflectedDynamicTerrainList.
bool createdLocally
Definition: reflectedObjectLists.h:68
DtReflectedListInformation< DtReflectedPropulsionNoiseList > reflectedPropulsionNoiseList
Definition: reflectedObjectLists.h:157
DtReflectedListInformation< DtReflectedIffList > reflectedIffList
Definition: reflectedObjectLists.h:162
bool operator!=(const DtReflectedListInformation &rhs) const
Definition: reflectedObjectLists.h:109
Contains the DtReflectedExtAggregateList class declaration.
void setDisableTimeoutProcessing(bool b)
Definition: reflectedObjectLists.h:192
Definition: reflectedObjectLists.h:63
DiscoveryCondition existingDiscoveryCondition
Definition: reflectedObjectLists.h:69
DiscoveryCondition()
Definition: reflectedObjectLists.h:56
DtReflectedListInformation< DtReflectedLandSurfaceList > reflectedLandSurfaceList
Definition: reflectedObjectLists.h:163
bool operator==(const DtReflectedListInformation &rhs) const
Definition: reflectedObjectLists.h:103
DtReflectedListInformation< DtReflectedEmitterSystemList > reflectedEmitterSystemList
Definition: reflectedObjectLists.h:154
T_ReflectedList * reflectedList
Definition: reflectedObjectLists.h:67
class DtReflectedNavAidList:
Definition: reflectedNavAidListDIS.h:19
void setTimeoutInterval(int timeout)
Definition: reflectedObjectLists.h:174
DtReflectedListInformation< DtReflectedRadioReceiverList > reflectedRadioReceiverList
Definition: reflectedObjectLists.h:160
DtReflectedListInformation< DtReflectedAggregateList > reflectedAggregatesList
Definition: reflectedObjectLists.h:151
DtReflectedListInformation< DtReflectedEnvironmentProcessList > reflectedEnvironmentalsList
Definition: reflectedObjectLists.h:152
DtReflectedListInformation< DtReflectedWindCorridorList > reflectedWindCorridorList
Definition: reflectedObjectLists.h:168
DtReflectedListInformation< DtReflectedTroposphereLayerList > reflectedTroposphereLayerList
Definition: reflectedObjectLists.h:166
Contains the DtReflectedControlObjectList class declaration.
void backup()
Definition: reflectedObjectLists.h:80
DtReflectedListInformation< DtReflectedRadioTransmitterList > reflectedRadioTransmitterList
Definition: reflectedObjectLists.h:158
DtReflectedListInformation< DtReflectedDynamicTerrainList > reflectedDynamicTerrainList
Definition: reflectedObjectLists.h:161
void * userData
Definition: reflectedObjectLists.h:59
void clear()
Definition: reflectedObjectLists.h:57
DtDiscoveryCondition fcn
Definition: reflectedObjectLists.h:57
DtReflectedListInformation< DtReflectedAerodromeList > reflectedAerodromesList
Definition: reflectedObjectLists.h:153
void create(DtExerciseConn *conn)
Definition: reflectedObjectLists.h:97
void * discoveryConditionData() const
Definition: reflectedObjectLists.h:77
Definition: reflectedObjectLists.h:71
DtReflectedListInformation< DtReflectedWaterSurfaceList > reflectedWaterSurfaceList
Definition: reflectedObjectLists.h:165
DtReflectedListInformation< DtReflectedSubsurfaceLayerList > reflectedSubsurfaceLayerList
Definition: reflectedObjectLists.h:164
DtReflectedListInformation< makVrfVrlinkExtToolkit::DtReflectedExtendedAttributesObjectList > reflectedExtendedAttributesObjectList
Definition: reflectedObjectLists.h:170
DtReflectedListInformation & operator=(const DtReflectedListInformation &rhs)
Definition: reflectedObjectLists.h:89
void setTimeoutProcessing(bool b)
Definition: reflectedObjectLists.h:138
Definition: reflectedObjectLists.h:148
Definition: reflectedObjectLists.h:54
void setTimeoutInterval(int timeout)
Definition: reflectedObjectLists.h:130
DtDiscoveryCondition discoveryCondition() const
Definition: reflectedObjectLists.h:76

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)