13 #include <vlutil/vlExceptions.h>
32 #include <boost/function.hpp>
33 #include <boost/unordered_set.hpp>
42 class DtVrfSelectionFilter;
43 class DtVrfGuiOrbatManager;
45 class DtAggregateStateViewCollection;
46 class DtPropulsionNoiseStateDataViewCollection;
47 class DtIffStateDataViewCollection;
48 class DtEmitterSystemStateViewCollection;
49 class DtWeatherStateViewCollection;
50 class DtEnvironmentStateViewCollection;
51 class DtActiveSonarStateViewCollection;
66 operator DtString () {
return markingText(); };
78 : makVrv::DtStateViewCollection<makVrv::DtVrlinkSimulatedEntityState>(
79 de, makVrv::DtSimEntryUpdater::NoUpdates)
92 makVrv::DtStateViewCollection<makVrv::DtVrlinkSimulatedBaseState>(de, makVrv::DtSimEntryUpdater::NoUpdates)
150 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupObjectData(
const makVrv::DtUniqueID&
id);
154 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupSpotReportData(
const makVrv::DtUniqueID&
id);
158 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupVrfTDLData(
const makVrv::DtUniqueID&
id);
162 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupSpotReportData(
const std::string& name);
166 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupVrfTDLData(
const std::string& uniqueIdentifier);
170 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupOrbatData(
const makVrv::DtUniqueID&
id);
174 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupOrbatData(
const std::string& name);
178 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupObjectData(
const DtUUID&);
181 virtual DtVector centerOfMass(
const boost::unordered_set<DtUUID>& uuids,
182 bool ignoreEmbarked =
true);
187 template<
typename T_ObjectDataInterfaceType>
190 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupObjectData(
id));
196 template<
typename T_ObjectDataInterfaceType>
197 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastSpotReportData(
const makVrv::DtUniqueID&
id)
199 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupSpotReportData(
id));
205 template<
typename T_ObjectDataInterfaceType>
208 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupVrfTDLData(
id));
214 template<
typename T_ObjectDataInterfaceType>
217 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupOrbatData(
id));
223 template<
typename T_ObjectDataInterfaceType>
224 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastObjectData(
const DtUUID& uuid)
226 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupObjectData(uuid));
232 template<
typename T_ObjectDataInterfaceType>
233 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastSpotReportData(
const std::string& name)
235 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupSpotReportData(name));
241 template<
typename T_ObjectDataInterfaceType>
242 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastVrfTDLData(
const std::string&
id)
244 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupVrfTDLData(
id));
250 template<
typename T_ObjectDataInterfaceType>
251 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastOrbatData(
const std::string& name)
253 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupOrbatData(name));
271 const std::string& markingText);
290 if (!mySpotReportStateViewCollection->hasStateView(
id))
296 (mySpotReportStateViewCollection->findStateView(
id));
303 if (!myVrfTDLDataStateViewCollection->hasStateView(
id))
309 (myVrfTDLDataStateViewCollection->findStateView(
id));
316 if (!myExternalDataStateViewCollection->hasStateView(
id))
322 (myExternalDataStateViewCollection->findStateView(
id));
329 if (!myOrbatStateViewCollection->hasStateView(
id))
335 (myOrbatStateViewCollection->findStateView(
id));
339 virtual void clearUUIDInformation();
346 return mySimulatedEntityStateView;
351 return mySimulatedBaseStateViewCollection;
356 return myObjectDataStateViewCollection;
361 return myEnvironmentStateViewCollection;
366 return myExtendedStateDataViewCollection;
371 return myWeatherStateViewCollection;
376 return myIffStateDataViewCollection;
381 return myPropulsionNoiseStateDataViewCollection;
386 return myEmitterSystemStateViewCollection;
391 return myActiveSonarStateViewCollection;
396 return mySpotReportStateViewCollection;
401 return myExternalDataStateViewCollection;
406 return myVrfTDLDataStateViewCollection;
411 return myOrbatStateViewCollection;
416 return myAggregateStateViewCollection;
421 return mySensorFieldOfViewStateViewCollection;
436 const std::map<makVrv::DtUniqueID, const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*>&
437 stealthStates()
const
439 return myStealthStates;
457 typedef std::vector<makVrv::DtSimEntryUpdater::UpdateRate>
UpdateRates;
475 virtual void waiting();
494 virtual const std::set<makVrv::DtUniqueID>& dIGuyIds();
498 virtual void signalWhenAllObjectsDiscovered(
const std::map<short, int>&);
507 boost::signal <void (const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*)> signal_stateAdded;
508 boost::signal <void (const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*)> signal_stateRemoved;
511 boost::signal<void (makVrv::DtUniqueID, const DtUUID& oldUUID, const DtUUID& newUUID)>
signal_uuidChanged;
518 boost::signal <void (const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*,
const std::string& newName)> signal_nameChanged;
520 const std::set<makVrv::DtUniqueID>& tacticalGraphicElements()
const;
525 virtual int maxMarkingTextLengthFor(
const DtEntityType&)
const;
529 virtual int defaultMaxMarkingTextLengthFunction(
const DtEntityType&);
563 typedef boost::unordered_map<makVrv::DtBaseStateView*, UpdateRates>
UpdateRateMap;
583 typedef boost::unordered_map<DtUUID, makVrv::DtUniqueID>
UUIDToIdMap;
584 typedef boost::unordered_map<makVrv::DtUniqueID, DtUUID>
IdToUUIDMap;
591 std::map<makVrv::DtUniqueID, const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*>
myStealthStates;
606 makVrv::DtSimEntry::SimStateVector::const_iterator pos = entry->
simStates().begin();
607 makVrv::DtSimEntry::SimStateVector::const_iterator endPos = entry->
simStates().end();
608 for(; pos != endPos; ++pos)
610 T tState =
dynamic_cast<T
>(*pos);