13 #include <vlutil/vlExceptions.h>
33 #include <boost/function.hpp>
34 #include <boost/unordered_set.hpp>
43 class DtVrfSelectionFilter;
44 class DtVrfGuiOrbatManager;
46 class DtAggregateStateViewCollection;
47 class DtPropulsionNoiseStateDataViewCollection;
48 class DtIffStateDataViewCollection;
49 class DtEmitterSystemStateViewCollection;
50 class DtWeatherStateViewCollection;
51 class DtCloudLayerStateViewCollection;
52 class DtEnvironmentStateViewCollection;
53 class DtActiveSonarStateViewCollection;
54 class DtLaserDesignatorStateViewCollection;
69 operator DtString () {
return markingText(); };
81 : makVrv::DtStateViewCollection<makVrv::DtVrlinkSimulatedEntityState>(
82 de, makVrv::DtSimEntryUpdater::NoUpdates)
95 makVrv::DtStateViewCollection<makVrv::DtVrlinkSimulatedBaseState>(de, makVrv::DtSimEntryUpdater::NoUpdates)
153 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupObjectData(
const makVrv::DtUniqueID&
id);
157 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupSpotReportData(
const makVrv::DtUniqueID&
id);
161 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupVrfTDLData(
const makVrv::DtUniqueID&
id);
165 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupSpotReportData(
const std::string& name);
169 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupVrfTDLData(
const std::string& uniqueIdentifier);
173 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupOrbatData(
const makVrv::DtUniqueID&
id);
177 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupOrbatData(
const std::string& name);
181 virtual DtBoost::shared_ptr<DtObjectDataInterface> lookupObjectData(
const DtUUID&);
184 virtual DtVector centerOfMass(
const boost::unordered_set<DtUUID>& uuids,
185 bool ignoreEmbarked =
true);
190 template<
typename T_ObjectDataInterfaceType>
193 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupObjectData(
id));
199 template<
typename T_ObjectDataInterfaceType>
200 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastSpotReportData(
const makVrv::DtUniqueID&
id)
202 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupSpotReportData(
id));
208 template<
typename T_ObjectDataInterfaceType>
211 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupVrfTDLData(
id));
217 template<
typename T_ObjectDataInterfaceType>
220 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupOrbatData(
id));
226 template<
typename T_ObjectDataInterfaceType>
227 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastObjectData(
const DtUUID& uuid)
229 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupObjectData(uuid));
235 template<
typename T_ObjectDataInterfaceType>
236 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastSpotReportData(
const std::string& name)
238 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupSpotReportData(name));
244 template<
typename T_ObjectDataInterfaceType>
245 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastVrfTDLData(
const std::string&
id)
247 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupVrfTDLData(
id));
253 template<
typename T_ObjectDataInterfaceType>
254 DtBoost::shared_ptr<T_ObjectDataInterfaceType> lookupAndCastOrbatData(
const std::string& name)
256 return DtObjectDataInterface::cast<T_ObjectDataInterfaceType>(lookupOrbatData(name));
274 const std::string& markingText);
297 if (!mySpotReportStateViewCollection->hasStateView(
id))
303 (mySpotReportStateViewCollection->findStateView(
id));
310 if (!myVrfTDLDataStateViewCollection->hasStateView(
id))
316 (myVrfTDLDataStateViewCollection->findStateView(
id));
323 if (!myExternalDataStateViewCollection->hasStateView(
id))
329 (myExternalDataStateViewCollection->findStateView(
id));
336 if (!myOrbatStateViewCollection->hasStateView(
id))
342 (myOrbatStateViewCollection->findStateView(
id));
346 virtual void clearUUIDInformation();
353 return mySimulatedEntityStateView;
358 return mySimulatedBaseStateViewCollection;
363 return myObjectDataStateViewCollection;
368 return myEnvironmentStateViewCollection;
373 return myExtendedStateDataViewCollection;
378 return myWeatherStateViewCollection;
383 return myCloudLayerStateViewCollection;
388 return myIffStateDataViewCollection;
393 return myPropulsionNoiseStateDataViewCollection;
398 return myEmitterSystemStateViewCollection;
403 return myActiveSonarStateViewCollection;
408 return myLaserDesignatorStateViewCollection;
413 return mySpotReportStateViewCollection;
418 return myExternalDataStateViewCollection;
423 return myVrfTDLDataStateViewCollection;
428 return myOrbatStateViewCollection;
433 return myAggregateStateViewCollection;
438 return mySensorFieldOfViewStateViewCollection;
453 const std::map<makVrv::DtUniqueID, const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*>&
454 stealthStates()
const
456 return myStealthStates;
474 typedef std::vector<makVrv::DtSimEntryUpdater::UpdateRate>
UpdateRates;
492 virtual void waiting();
511 virtual const std::set<makVrv::DtUniqueID>& dIGuyIds();
515 virtual void signalWhenAllObjectsDiscovered(
const std::map<short, int>&);
524 boost::signal <void (const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*)> signal_stateAdded;
525 boost::signal <void (const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*)> signal_stateRemoved;
528 boost::signal<void (makVrv::DtUniqueID, const DtUUID& oldUUID, const DtUUID& newUUID)>
signal_uuidChanged;
535 boost::signal <void (const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*,
const std::string& newName)> signal_nameChanged;
537 const std::set<makVrv::DtUniqueID>& tacticalGraphicElements()
const;
542 virtual int maxMarkingTextLengthFor(
const DtEntityType&)
const;
546 virtual int defaultMaxMarkingTextLengthFunction(
const DtEntityType&);
582 typedef boost::unordered_map<makVrv::DtBaseStateView*, UpdateRates>
UpdateRateMap;
602 typedef boost::unordered_map<DtUUID, makVrv::DtUniqueID>
UUIDToIdMap;
603 typedef boost::unordered_map<makVrv::DtUniqueID, DtUUID>
IdToUUIDMap;
610 std::map<makVrv::DtUniqueID, const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>*>
myStealthStates;
625 makVrv::DtSimEntry::SimStateVector::const_iterator pos = entry->
simStates().begin();
626 makVrv::DtSimEntry::SimStateVector::const_iterator endPos = entry->
simStates().end();
627 for(; pos != endPos; ++pos)
629 T tState =
dynamic_cast<T
>(*pos);