WSF
lib/source/map/Zone.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 2020 Infoscitex, a DCS 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 ZONE_HPP
13#define ZONE_HPP
14
15#include "UtCallbackHolder.hpp"
16#include "ViExport.hpp"
17#include "WsfPM_Zone.hpp"
18
19namespace vespa
20{
21
22class VaEntity;
23} // namespace vespa
24namespace wkf
25{
26class AttachmentZoneCircle;
27class AttachmentZoneEllipse;
28class AttachmentZonePolygon;
29class AttachmentZone;
30} // namespace wkf
31namespace wizard
32{
33class ZoneSet;
34class ProxyChange;
39
41{
42public:
43 // Zone(WsfPM_Zone& aZoneNode);
44 Zone(WsfPM_ZoneDefinition& aZoneNode, ZoneSet* aOwningZoneSetPtr, int aZoneSetIndex);
45 ~Zone() = default;
46
49 const std::string GetReferencePlatformName() const { return mReferencePlatformName; }
50
52 void RemoveZone();
53
56 bool IsGlobal() { return mIsGlobal; }
57
60 wkf::AttachmentZone* GetZone() { return mZonePtr; }
61
62
65 const std::string GetZoneSetName() const;
66
68 const std::string GetParentPlatformName() const;
69
71 std::string GetDefinitionName() const { return mZoneDefName; }
72
74 std::string GetDefinitionParentPlatformName() const { return mZoneDefParentPlatName; }
75
76 void LinkProxyCallbacks();
77
78 void UnlinkProxyCallbacks();
79
80
83 WsfPM_Zone& GetZoneProxyNode() { return mZoneProxyNode; }
84
85
88 void UpdateZone(WsfPM_ZoneDefinition& aZone);
89
90private:
93 void OnProxyModified(const ProxyChange& aProxyChange);
94
97 void AddZone(WsfPM_ZoneDefinition& aZone);
98
99
103 void SetCircularZoneData(wizard::AttachmentZoneCircle* aZonePtr, const WsfPM_ZoneDefinition& aZoneDef);
104
108 void SetEllipticalZoneData(wizard::AttachmentZoneEllipse* aZonePtr, const WsfPM_ZoneDefinition& aZoneDef);
109
113 void SetSphericalZoneData(wizard::AttachmentZoneSphere* aZonePtr, const WsfPM_ZoneDefinition& aZoneDef);
114
118 void SetPolygonalZoneData(wizard::AttachmentZonePolygon* aZonePtr, const WsfPM_ZoneDefinition& aZoneDef);
119
122 void SetZonePositionAndHeading(const WsfPM_ZoneDefinition& aZoneDefinition);
123
124 void SetZoneColors(const WsfPM_ZoneDefinition& aZoneDefinition);
125
127 std::string mZoneDefName;
128
130 std::string mZoneDefParentPlatName;
131
133 ZoneSet* mOwningZoneSetPtr;
134
136 vespa::VaEntity* mAnchorPtr = nullptr;
137
139 std::string mReferencePlatformName = "";
140
142 int mZoneSetIndex = 1;
143
145 bool mIsGlobal = false;
146
148 WsfPM_ZoneDefinition mZoneProxyNode;
149
151 wkf::AttachmentZone* mZonePtr = nullptr;
152
154 UtCallback* mUpdateCallbackPtr = nullptr;
155
157 UtCallbackHolder mProxyCallbacks;
158};
159} // namespace wizard
160
161#endif // ZONE_HPP
#define VI_EXPORT
Definition ViExport.hpp:38
Definition WsfPM_Zone.hpp:100
Definition WsfPM_Zone.hpp:57
Definition AttachmentZoneCircle.hpp:27
Definition AttachmentZoneEllipse.hpp:27
Definition AttachmentZonePolygon.hpp:27
Definition AttachmentZoneSphere.hpp:27
Records a change to proxy data.
Definition ProxyChange.hpp:21
Definition ZoneSet.hpp:35
wkf::AttachmentZone * GetZone()
Get the AttachmentZone associated with this zone.
Definition lib/source/map/Zone.hpp:60
bool IsGlobal()
Get whether or not this is a global zone.
Definition lib/source/map/Zone.hpp:56
~Zone()=default
const std::string GetReferencePlatformName() const
Get the reference platform name.
Definition lib/source/map/Zone.hpp:49
std::string GetDefinitionParentPlatformName() const
Get the definition's parent platform name.
Definition lib/source/map/Zone.hpp:74
Zone(WsfPM_ZoneDefinition &aZoneNode, ZoneSet *aOwningZoneSetPtr, int aZoneSetIndex)
Definition lib/source/map/Zone.cpp:43
std::string GetDefinitionName() const
Definition lib/source/map/Zone.hpp:71
WsfPM_Zone & GetZoneProxyNode()
Get the zone proxy node.
Definition lib/source/map/Zone.hpp:83
Definition EditorHelpers.hpp:37
Definition Runner.hpp:22
Definition ActionManager.hpp:28
Copyrights Multiple, All Rights Reserved