WSF
WsfEW_AgilityEffect.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11// ****************************************************************************
12// Updated by Infoscitex, a DCS Company
13// ****************************************************************************
14
15#ifndef WSFEW_AGILITYEFFECT_HPP
16#define WSFEW_AGILITYEFFECT_HPP
17
18#include "wsf_mil_export.h"
19
20#include <iosfwd>
21#include <map>
22
23class UtInput;
24
25#include "WsfEM_Interaction.hpp"
26#include "WsfEW_Effect.hpp"
27#include "WsfEW_Types.hpp"
28
29class WSF_MIL_EXPORT WsfEW_AgilityEffect : public WsfEW_Effect
30{
31public:
33 {
36 };
37
42 ~WsfEW_AgilityEffect() override = default;
43 WsfEW_Effect* Clone() const override;
44 bool Initialize(WsfSimulation& aSimulation) override;
45 bool ProcessInput(UtInput& aInput) override;
46
47 void ApplyUnmitigatedEffect(WsfEW_Effects& aEW_Effects) const override;
48
49 void ApplyMitigatedEffect(WsfEW_Effect* aEW_EffectPtr, WsfEW_Effects& aEW_Effects) const override;
50
51 void UpdateEffects(double aSimTime,
52 const WsfEM_Interaction& aTargetInteraction,
53 const WsfEM_Interaction& aJammerToTgtInteraction,
54 const ut::optional<WsfEM_Interaction>& aTgtToJammerInteraction,
55 WsfEW_Effects& aEW_Effects,
56 WsfEW_Effect* aEW_EffectPtr = nullptr) override;
57
59
60
61 int GetAgilityTypeMask() const { return mAgilityTypeMask; }
63
64protected:
66
67private:
68 class AgilityDataValues
69 {
70 public:
71 AgilityDataValues()
72 : mId()
73 , mValue(0.0)
74 {
75 }
76
77 virtual ~AgilityDataValues() = default;
78
79 bool operator==(const AgilityDataValues& aRhs) const;
80 bool operator!=(const AgilityDataValues& aRhs) const;
81
82 WsfStringId mId;
83 double mValue;
84 };
85
87 using AgilityDataVec = std::vector<AgilityDataValues>;
88 using AgilityDataVecIter = std::vector<AgilityDataValues>::iterator;
89
91 using AgilityMap = std::map<unsigned int, AgilityDataVec>;
92 using AgilityMapIter = std::map<unsigned int, AgilityDataVec>::iterator;
93
95 // typedef std::map<unsigned int, double> AgilityTimeMap;
96 // typedef std::map<unsigned int, double>::iterator AgilityTimeMapIter;
97
98 using CurrentIdMap = std::map<unsigned int, int>;
99
100 // Input variables
102 AgilityMap mAgilityMap;
103
105 int mAgilityTypeMask = 0;
106
108 bool mFrequencyChangeScheduled = false;
109 bool mModeChangeScheduled = false;
110};
111
112#endif
bool operator!=(int aId, const WsfStringInt &aRhs)
Not equal relational operator for the case of an integer on the LHS and a StringId on the RHS.
Definition WsfStringId.hpp:75
bool operator==(int aId, const WsfStringInt &aRhs)
Equal relational operator for the case of an integer on the LHS and a StringId on the RHS.
Definition WsfStringId.hpp:69
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
Definition WsfEM_Interaction.hpp:68
Definition WsfEW_AgilityEffect.hpp:30
WsfEW_AgilityEffect & operator=(const WsfEW_AgilityEffect &)=delete
WsfEW_AgilityEffect(const WsfEW_AgilityEffect &aSrc)=default
AgilityType
Definition WsfEW_AgilityEffect.hpp:33
@ cAT_MODE
Definition WsfEW_AgilityEffect.hpp:34
@ cAT_FREQUENCY
Definition WsfEW_AgilityEffect.hpp:35
~WsfEW_AgilityEffect() override=default
WsfEW_AgilityEffect & operator=(WsfEW_AgilityEffect &&)=default
WsfEW_AgilityEffect(WsfEW_AgilityEffect &&)=default
int GetAgilityTypeMask() const
Definition WsfEW_AgilityEffect.hpp:61
WsfEW_AgilityEffect()
Definition WsfEW_AgilityEffect.cpp:38
WsfEW_Effect * Clone() const override=0
virtual void UpdateEffects(double aSimTime, const WsfEM_Interaction &aTargetInteraction, const WsfEM_Interaction &aJammerToTgtInteraction, const ut::optional< WsfEM_Interaction > &aTgtToJammerInteraction, WsfEW_Effects &aEW_Effects, WsfEW_Effect *aEW_EffectPtr=nullptr)
Definition WsfEW_Effect.cpp:374
virtual bool Initialize(WsfSimulation &aSimulation)
Definition WsfEW_Effect.cpp:69
virtual void ApplyUnmitigatedEffect(WsfEW_Effects &aEW_Effects) const =0
virtual void ApplyMitigatedEffect(WsfEW_Effect *aEW_EffectPtr, WsfEW_Effects &aEW_Effects) const =0
bool ProcessInput(UtInput &aInput) override
Definition WsfEW_Effect.cpp:110
WsfEW_Effect()=default
Definition WsfEW_Effects.hpp:41
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Copyrights Multiple, All Rights Reserved