WSF
WsfC2ComponentRefInterface.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI//REL TO USA ONLY
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// The use, dissemination or disclosure of data in this file is subject to
7// limitation or restriction. See accompanying README and LICENSE for details.
8// ****************************************************************************
9/*******************************************************************************
10*
11* File: WsfC2ComponentRefInterface.hpp
12*
13* Classification: UNCLASSIFIED
14*
15* Details:
16*
17* Contract Number:
18* Contractor Name: Radiance Technologies
19* Address: 350 Wynn Drive
20* Huntsville, AL 35805
21*
22* Abstract:
23*
24*******************************************************************************/
25
26#ifndef WSF_C2_COMPONENT_REF_INTERFACE_HPP
27#define WSF_C2_COMPONENT_REF_INTERFACE_HPP
28
29#include <exception>
30#include <memory>
31
32#include <WsfBMCommon.hpp>
33
34#include <iadsLib/assetManagerInterface.hpp>
35#include <iadsLib/BattleManagerIface.hpp>
36#include <iadsLib/disseminateC2Interface.hpp>
37#include <iadsLib/weaponsManagerInterface.hpp>
38#include <iadsLib/sensorsManagerInterface.hpp>
39#include <iadsLib/moeLoggingInterface.hpp>
40
42{
43 public:
44 explicit WsfC2ComponentContainer(const std::shared_ptr<il::BattleManagerInterface>& component, const std::shared_ptr<il::moeLoggingInterface>& logger = nullptr);
45 explicit WsfC2ComponentContainer(const std::shared_ptr<il::AssetManagerInterface>& component, const std::shared_ptr<il::moeLoggingInterface>& logger = nullptr);
46 explicit WsfC2ComponentContainer(const std::shared_ptr<il::DisseminateC2Interface>& component, const std::shared_ptr<il::moeLoggingInterface>& logger = nullptr);
47 explicit WsfC2ComponentContainer(const std::shared_ptr<il::WeaponsManagerInterface>& component, const std::shared_ptr<il::moeLoggingInterface>& logger = nullptr);
48 explicit WsfC2ComponentContainer(const std::shared_ptr<il::SensorsManagerInterface>& component, const std::shared_ptr<il::moeLoggingInterface>& logger = nullptr);
49
50 virtual WSF_IADS_C2_LIB_EXPORT bool SetComponent(const std::shared_ptr<il::BattleManagerInterface>& component);
51 virtual WSF_IADS_C2_LIB_EXPORT bool SetComponent(const std::shared_ptr<il::AssetManagerInterface>& component);
52 virtual WSF_IADS_C2_LIB_EXPORT bool SetComponent(const std::shared_ptr<il::DisseminateC2Interface>& component);
53 virtual WSF_IADS_C2_LIB_EXPORT bool SetComponent(const std::shared_ptr<il::WeaponsManagerInterface>& component);
54 virtual WSF_IADS_C2_LIB_EXPORT bool SetComponent(const std::shared_ptr<il::SensorsManagerInterface>& component);
55
56 inline virtual std::shared_ptr<il::BattleManagerInterface> GetCoreBMRef() const { return m_bm_component; }
57 inline virtual std::shared_ptr<il::AssetManagerInterface> GetCoreAMRef() const { return m_am_component; }
58 inline virtual std::shared_ptr<il::DisseminateC2Interface> GetCoreDC2Ref() const { return m_dc2_component; }
59 inline virtual std::shared_ptr<il::SensorsManagerInterface> GetCoreSMRef() const { return m_sm_component; }
60 inline virtual std::shared_ptr<il::WeaponsManagerInterface> GetCoreWMRef() const { return m_wm_component; }
61
62 inline virtual bool HasBMComponent() const { return m_bm_component.get() != nullptr; }
63 inline virtual bool HasAMComponent() const { return m_am_component.get() != nullptr; }
64 inline virtual bool HasDC2Component() const { return m_dc2_component.get() != nullptr; }
65 inline virtual bool HasWMComponent() const { return m_wm_component.get() != nullptr; }
66 inline virtual bool HasSMComponent() const { return m_sm_component.get() != nullptr; }
67
68 protected:
69 std::shared_ptr<il::BattleManagerInterface> m_bm_component;
70 std::shared_ptr<il::AssetManagerInterface> m_am_component;
71 std::shared_ptr<il::DisseminateC2Interface> m_dc2_component;
72 std::shared_ptr<il::WeaponsManagerInterface> m_wm_component;
73 std::shared_ptr<il::SensorsManagerInterface> m_sm_component;
74
75 std::shared_ptr<il::moeLoggingInterface> m_moe_logger;
76
77 private:
78 const bool m_is_bm_class;
79 const bool m_is_am_class;
80 const bool m_is_dc2_class;
81 const bool m_is_wm_class;
82 const bool m_is_sm_class;
83};
84
85#endif
std::shared_ptr< il::BattleManagerInterface > m_bm_component
Definition WsfC2ComponentRefInterface.hpp:69
virtual std::shared_ptr< il::DisseminateC2Interface > GetCoreDC2Ref() const
Definition WsfC2ComponentRefInterface.hpp:58
virtual std::shared_ptr< il::BattleManagerInterface > GetCoreBMRef() const
Definition WsfC2ComponentRefInterface.hpp:56
std::shared_ptr< il::AssetManagerInterface > m_am_component
Definition WsfC2ComponentRefInterface.hpp:70
std::shared_ptr< il::WeaponsManagerInterface > m_wm_component
Definition WsfC2ComponentRefInterface.hpp:72
virtual bool HasBMComponent() const
Definition WsfC2ComponentRefInterface.hpp:62
virtual std::shared_ptr< il::WeaponsManagerInterface > GetCoreWMRef() const
Definition WsfC2ComponentRefInterface.hpp:60
virtual bool HasWMComponent() const
Definition WsfC2ComponentRefInterface.hpp:65
virtual std::shared_ptr< il::SensorsManagerInterface > GetCoreSMRef() const
Definition WsfC2ComponentRefInterface.hpp:59
virtual WSF_IADS_C2_LIB_EXPORT bool SetComponent(const std::shared_ptr< il::BattleManagerInterface > &component)
Definition WsfC2ComponentRefInterface.cpp:81
virtual bool HasSMComponent() const
Definition WsfC2ComponentRefInterface.hpp:66
std::shared_ptr< il::DisseminateC2Interface > m_dc2_component
Definition WsfC2ComponentRefInterface.hpp:71
virtual bool HasAMComponent() const
Definition WsfC2ComponentRefInterface.hpp:63
std::shared_ptr< il::SensorsManagerInterface > m_sm_component
Definition WsfC2ComponentRefInterface.hpp:73
WsfC2ComponentContainer(const std::shared_ptr< il::BattleManagerInterface > &component, const std::shared_ptr< il::moeLoggingInterface > &logger=nullptr)
Definition WsfC2ComponentRefInterface.cpp:31
std::shared_ptr< il::moeLoggingInterface > m_moe_logger
Definition WsfC2ComponentRefInterface.hpp:75
virtual std::shared_ptr< il::AssetManagerInterface > GetCoreAMRef() const
Definition WsfC2ComponentRefInterface.hpp:57
virtual bool HasDC2Component() const
Definition WsfC2ComponentRefInterface.hpp:64
Copyrights Multiple, All Rights Reserved