WSF
WsfAltLocSimulationExtension.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
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#ifndef WSF_ALT_LOC_SIMULATION_EXTENSION_HPP
10#define WSF_ALT_LOC_SIMULATION_EXTENSION_HPP
11
12#include "wsf_alternate_locations_export.h"
13
14#include "UtCallback.hpp"
16class WsfPlatform;
18
19// --------- AlternateLocationsObserver
22namespace WsfObserver
23{
24using EventCallback = UtCallbackListN<void(double, WsfPlatform*, wsf::altloc::Component*)>;
25
26WSF_ALTERNATE_LOCATIONS_EXPORT EventCallback& Event(const WsfSimulation* aSimulationPtr);
27} // namespace WsfObserver
28
29namespace wsf
30{
31namespace altloc
32{
39
41{
42public:
43 static constexpr const char* cEXTENSION = "wsf_alternate_locations";
44
46 : mData(aData)
47 {
48 }
49
50 void AddedToSimulation() override;
51
52 static SimulationExtension& Get(const WsfSimulation& aSimulation);
53
54 WsfObserver::EventCallback& GetObserver() { return mAltLocEventCallback; }
55
56 bool GetGlobalDebugEnabled() const { return mData.mGlobalDebugEnabled; }
57 bool GetGlobalDrawEnabled() const { return mData.mGlobalDrawEnabled; }
58 double GetDraw();
59
60private:
61 WsfObserver::EventCallback mAltLocEventCallback;
62 InputData mData;
63};
64} // namespace altloc
65} // namespace wsf
66
67#endif
Platforms represent a entity within the simulation.
Definition WsfPlatform.hpp:115
WsfSimulationExtension()
Definition WsfSimulationExtension.cpp:23
The main controller for a simulation.
Definition WsfSimulation.hpp:109
Definition WsfAltLocComponent.hpp:50
static constexpr double cINVALID_DRAW
Definition WsfAltLocComponent.hpp:60
Definition WsfAltLocSimulationExtension.hpp:41
static constexpr const char * cEXTENSION
Definition WsfAltLocSimulationExtension.hpp:43
void AddedToSimulation() override
Definition WsfAltLocSimulationExtension.cpp:29
bool GetGlobalDrawEnabled() const
Definition WsfAltLocSimulationExtension.hpp:57
SimulationExtension(const InputData &aData)
Definition WsfAltLocSimulationExtension.hpp:45
bool GetGlobalDebugEnabled() const
Definition WsfAltLocSimulationExtension.hpp:56
WsfObserver::EventCallback & GetObserver()
Definition WsfAltLocSimulationExtension.hpp:54
double GetDraw()
Definition WsfAltLocSimulationExtension.cpp:44
static SimulationExtension & Get(const WsfSimulation &aSimulation)
Definition WsfAltLocSimulationExtension.cpp:39
Observer definitions for cyber events.
Definition WsfAdvancedBehaviorObserver.hpp:22
UtCallbackListN< void(double, WsfPlatform *, wsf::altloc::Component *)> EventCallback
Definition WsfAltLocSimulationExtension.hpp:24
WSF_ALTERNATE_LOCATIONS_EXPORT EventCallback & Event(const WsfSimulation *aSimulationPtr)
Definition WsfAltLocSimulationExtension.cpp:19
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Definition WsfAltLocSimulationExtension.hpp:34
bool mGlobalDrawEnabled
Definition WsfAltLocSimulationExtension.hpp:36
bool mGlobalDebugEnabled
Definition WsfAltLocSimulationExtension.hpp:35
double mGlobalDraw
Definition WsfAltLocSimulationExtension.hpp:37
Copyrights Multiple, All Rights Reserved