WSF
WsfEW_EP.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#ifndef WSFEW_EP_HPP
13#define WSFEW_EP_HPP
14
15#include "wsf_mil_export.h"
16
17#include <map>
18#include <vector>
19
20class UtInput;
21class UtInputBlock;
22#include "WsfEM_Rcvr.hpp"
23#include "WsfEW_EA_EP.hpp"
24class WsfEW_Effect;
25#include "WsfEW_Technique.hpp"
26#include "WsfEW_Types.hpp"
27
34
35class WSF_MIL_EXPORT WsfEW_EP : public WsfEW_EA_EP
36{
37public:
38 static WsfEW_EA_EP* GetElectronicProtect(const WsfEM_Rcvr& aRcvr);
39 static void SetElectronicProtect(WsfEM_Rcvr& aRcvr, WsfEW_EA_EP* aElectronicProtectPtr);
40
41 WsfEW_EP();
42 WsfEW_EP& operator=(const WsfEW_EP&) = delete;
43 ~WsfEW_EP() override;
44
46
47 WsfEW_EA_EP* Clone() const override;
48 bool Initialize(WsfSimulation& aSimulation, WsfEM_XmtrRcvr* aXmtrRcvrPtr) override;
50
53 {
54 public:
58 WsfEW_Technique* Clone() const override;
59 bool Initialize(WsfSimulation& aSimulation) override;
60 bool ProcessInput(UtInput& aInput) override;
61
62 WsfEW_Types::TechniqueIdVec* GetMitigatedTechniqueIds() override { return &mMitigatedTechniqueIds; }
63 std::vector<WsfEW_Types::TechniqueId>* GetMitigatedTechniqueClassIds() override
64 {
65 return &mMitigatedTechniqueClassIds;
66 }
67
68 bool IsExternallyControlled() const override { return mExternallyControlled; }
69
70 protected:
71 void ProcessMitigatedTechniquesBlock(UtInputBlock& aInputBlock);
72 void ProcessMitigatedTechniqueFlagsBlock(UtInputBlock& aInputBlock);
73
74 private:
76 WsfEW_Types::TechniqueIdVec mMitigatedTechniqueIds;
77
80 WsfEW_Types::TechniqueIdVec mMitigatedTechniqueClassIds;
81
84 bool mExternallyControlled;
85 };
86
88
89
91 typedef std::map<WsfEW_Types::TechniqueId, EP_Technique*> TechniqueIdToPtrMap;
92 typedef std::map<WsfEW_Types::TechniqueId, EP_Technique*>::iterator TechniqueIdToPtrMapIter;
93 typedef std::map<WsfEW_Types::TechniqueId, EP_Technique*>::const_iterator TechniqueIdToPtrMapConstIter;
94
95 bool AddTechnique(WsfEW_Technique* aTechniquePtr) override;
96
97 WsfEW_Technique* GetTechnique(WsfEW_Types::TechniqueId aTechniqueId) const override;
98 WsfEW_Technique* GetTechnique(unsigned int aIndex) const override;
99
102 virtual bool SelectTechnique(unsigned int aIndex, WsfEW_Effect::SystemFunction aSystemFunction);
104 virtual bool DeselectTechnique(unsigned int aIndex, WsfEW_Effect::SystemFunction aSystemFunction);
106
109
111
112
114 WsfEW_Effect::SystemFunction aAffectingSystemFunction,
115 WsfEW_Effect::SystemFunction aAffectedSystemFunction) override;
117
118protected:
119 WsfEW_EP(const WsfEW_EP& aSrc);
120
121private:
123 TechniqueIdToPtrMap mTechniquePtrMap;
124};
125
126#endif
Definition WsfEM_Rcvr.hpp:68
Definition WsfEM_XmtrRcvr.hpp:42
virtual bool DeselectTechnique(unsigned int aIndex)
Definition WsfEW_EA_EP.cpp:374
virtual bool Initialize(WsfSimulation &aSimulation, WsfEM_XmtrRcvr *aXmtrRcvrPtr)
Definition WsfEW_EA_EP.cpp:53
WsfEW_EA_EP * Clone() const override=0
WsfEW_EA_EP()
Definition WsfEW_EA_EP.cpp:32
virtual bool SelectTechnique(unsigned int aIndex)
Definition WsfEW_EA_EP.cpp:283
virtual WsfEW_Technique::EffectPtrVec GetMitigatingEffects(const WsfEW_Effect *aEA_EffectPtr, WsfEW_Effect::SystemFunction aAffectingSystemFunction, WsfEW_Effect::SystemFunction aAffectedSystemFunction)
Definition WsfEW_EA_EP.cpp:124
virtual bool AddTechnique(WsfEW_Technique *aTechniquePtr)
Definition WsfEW_EA_EP.cpp:228
virtual WsfEW_Technique * GetTechnique(WsfEW_Types::TechniqueId aTechniqueId) const
Definition WsfEW_EA_EP.cpp:159
EP_Technique(const EP_Technique &aSrc)
EP_Technique & operator=(const EP_Technique &)=delete
std::vector< WsfEW_Types::TechniqueId > * GetMitigatedTechniqueClassIds() override
Returns a pointer to the mitigated techniques list for this technique.
Definition WsfEW_EP.hpp:63
WsfEW_Technique * Clone() const override
Definition WsfEW_EP.cpp:546
EP_Technique()
Definition WsfEW_EP.cpp:532
WsfEW_Types::TechniqueIdVec * GetMitigatedTechniqueIds() override
Returns a pointer to the mitigated techniques list for this technique.
Definition WsfEW_EP.hpp:62
bool ProcessInput(UtInput &aInput) override
Definition WsfEW_EP.cpp:556
bool Initialize(WsfSimulation &aSimulation) override
Definition WsfEW_EP.cpp:551
bool IsExternallyControlled() const override
Definition WsfEW_EP.hpp:68
static void SetElectronicProtect(WsfEM_Rcvr &aRcvr, WsfEW_EA_EP *aElectronicProtectPtr)
Convenience method to set the electronic protect object for the specified receiver.
Definition WsfEW_EP.cpp:41
std::map< WsfEW_Types::TechniqueId, EP_Technique * >::const_iterator TechniqueIdToPtrMapConstIter
Definition WsfEW_EP.hpp:93
static WsfEW_EA_EP * GetElectronicProtect(const WsfEM_Rcvr &aRcvr)
Convenience method to get the electronic protect object for the specified receiver.
Definition WsfEW_EP.cpp:32
std::map< WsfEW_Types::TechniqueId, EP_Technique * > TechniqueIdToPtrMap
Map the technique's ID to its location (pointer).
Definition WsfEW_EP.hpp:91
WsfEW_EP & operator=(const WsfEW_EP &)=delete
WsfEW_Types::TechniqueIdVec * GetMitigatedTechniqueIds(WsfEW_Types::TechniqueId aId) const
Definition WsfEW_EP.cpp:418
WsfEW_EP()
Definition WsfEW_EP.cpp:48
std::map< WsfEW_Types::TechniqueId, EP_Technique * >::iterator TechniqueIdToPtrMapIter
Definition WsfEW_EP.hpp:92
Definition WsfEW_Effect.hpp:45
SystemFunction
The type of system function types the EW effect can affect.
Definition WsfEW_Effect.hpp:114
Definition WsfEW_Technique.hpp:37
WsfEW_Technique()
Definition WsfEW_Technique.cpp:33
std::vector< WsfEW_Effect * > EffectPtrVec
A vector type to hold list of effects.
Definition WsfEW_Technique.hpp:40
The main controller for a simulation.
Definition WsfSimulation.hpp:109
std::vector< TechniqueId > TechniqueIdVec
A type definition for a collection of EP or EA techniques.
Definition WsfEW_Types.hpp:29
WsfStringId TechniqueId
Definition WsfEW_Types.hpp:26
Copyrights Multiple, All Rights Reserved