WSF
WsfStandardInfraredSignature.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 WSFSTANDARDINFRAREDSIGNATURE_HPP
13#define WSFSTANDARDINFRAREDSIGNATURE_HPP
14
15#include "wsf_mil_export.h"
16
17#include <memory>
18#include <vector>
19
20class UtAzElLookup;
21class UtAzElTable;
22
23#include "WsfEM_Types.hpp"
25
27
29{
30public:
31 static WsfInfraredSignature* ObjectFactory(const std::string& aTypeName);
32
34
35 WsfInfraredSignature* Clone() const override;
36
37 bool InitializeType() override;
38
39 std::vector<WsfStringId> GetStateNames() const override;
40
41 bool ProcessInput(UtInput& aInput) override;
42
43 float GetSignature(double aSimTime,
44 WsfStringId aStateId,
46 double aAzimuth,
47 double aElevation) override;
48
50 class Table
51 {
52 public:
53 Table() = default;
54 Table(UtAzElTable* aTablePtr, bool aIsACopy);
55
57 UtAzElTable* mTablePtr{nullptr};
58
62 bool mIsACopy{false};
63 };
64
65 using BandIndex = std::vector<Table>::size_type;
66
68 class State
69 {
70 public:
71 State(WsfStringId aStateId);
72
75
77 std::vector<Table> mBands;
78 };
79
80 using StateIndex = std::vector<State>::size_type;
81
82 const std::vector<State>& GetStates() const;
83
84private:
86 class SharedData
87 {
88 public:
89 SharedData() = default;
90 ~SharedData();
91
92 bool InitializeType(WsfObject& aBase);
93
94 bool IsA_ValidState(WsfStringId aId) const;
95
96 bool ProcessInput(UtInput& aInput, WsfObject& aBase);
97
98 bool AddTable(UtAzElTable* aTablePtr, WsfStringId aState, WsfEM_Types::InfraredBand aBand);
99
100 void SelectTable(UtAzElLookup& aContext, WsfStringId aState, WsfEM_Types::InfraredBand aBand);
101
102 bool AssignDefaultTable(WsfObject& aBase, State& aState, WsfEM_Types::InfraredBand aBand);
103
104 WsfStringId mCurrentStateId{"default"};
106
107 StateIndex mDefaultStateIndex{0};
108 std::vector<State> mStates;
109
110 bool mInterpolateTables{true};
111 };
112
113 std::shared_ptr<SharedData> mSharedDataPtr{new SharedData()};
114};
115
116#endif
UtStringId WsfStringId
WsfStringId – the same thing as UtStringId.
Definition WsfStringId.hpp:23
WsfInfraredSignature * Clone() const override=0
WsfInfraredSignature()
Definition WsfInfraredSignature.cpp:28
virtual float GetSignature(double aSimTime, WsfStringId aStateId, WsfEM_Types::InfraredBand aBand, double aAzimuth, double aElevation)=0
WsfObject()
This is the constructor for the WsfObject class.
Definition WsfObject.cpp:88
bool ProcessInput(UtInput &aInput) override
Definition WsfSignature.cpp:74
virtual bool InitializeType()
Definition WsfSignature.cpp:40
virtual std::vector< WsfStringId > GetStateNames() const
get the list of all valid states belonging to the signature
Definition WsfSignature.hpp:43
virtual bool IsA_ValidState(WsfStringId aId) const
Definition WsfSignature.cpp:62
A 'State' represents all of the tables for a given signature state.
Definition WsfStandardInfraredSignature.hpp:69
WsfStringId mStateId
The string ID of the state name.
Definition WsfStandardInfraredSignature.hpp:74
State(WsfStringId aStateId)
Definition WsfStandardInfraredSignature.cpp:472
std::vector< Table > mBands
The tables for the various bands.
Definition WsfStandardInfraredSignature.hpp:77
UtAzElTable * mTablePtr
A pointer to the actual table data for this table.
Definition WsfStandardInfraredSignature.hpp:57
bool mIsACopy
Definition WsfStandardInfraredSignature.hpp:62
static WsfInfraredSignature * ObjectFactory(const std::string &aTypeName)
Factory method called by WsfInfraredSignatureTypes.
Definition WsfStandardInfraredSignature.cpp:29
std::vector< Table >::size_type BandIndex
Definition WsfStandardInfraredSignature.hpp:65
bool InitializeType() override
Definition WsfStandardInfraredSignature.cpp:48
bool ProcessInput(UtInput &aInput) override
Definition WsfStandardInfraredSignature.cpp:65
const std::vector< State > & GetStates() const
Definition WsfStandardInfraredSignature.cpp:95
std::vector< State >::size_type StateIndex
Definition WsfStandardInfraredSignature.hpp:80
InfraredBand
Infrared band names.
Definition WsfEM_Types.hpp:34
@ cIRBAND_DEFAULT
Default.
Definition WsfEM_Types.hpp:35
Copyrights Multiple, All Rights Reserved