WSF
WsfCoverageExistingPlatformGrid.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 WSFCOVERAGEEXISTINGPLATFORMGRID_HPP
13#define WSFCOVERAGEEXISTINGPLATFORMGRID_HPP
14
15#include "wsf_coverage_export.h"
16
17#include <map>
18#include <string>
19
20#include "WsfCoverageGrid.hpp"
22
23namespace wsf
24{
25namespace coverage
26{
27
33class WSF_COVERAGE_EXPORT ExistingPlatformGrid : public Grid
34{
35public:
36 explicit ExistingPlatformGrid(const WsfScenario& aScenario)
37 : Grid(aScenario)
38 {
40 }
42 ~ExistingPlatformGrid() override = default;
43
44 ExistingPlatformGrid* Clone() const override { return new ExistingPlatformGrid{*this}; }
45 bool ProcessInput(UtInput& aInput) override;
46
47 void PreparePlatforms(WsfSimulation& aSimulation) override;
48 const Point* GetPoint(PointId aPointId) const override;
49 std::size_t GetSize() const override { return mPlatforms.size(); }
50 void Invoke(GridAction& aAction) const override;
51 GridAsset GetAsset(PointId aPointId) const override;
52 GridAsset GetAsset(const std::string& aPlatformName) const override;
53 void HasNullDevice(bool& aAnyNull, bool& aAllNull) const override;
54 bool CreatesNewPlatforms() const override { return false; }
55 bool IsStructured() const override { return false; }
56
57 constexpr static const char* cTYPE{"WSF_EXISTING_PLATFORM_GRID"};
58
59protected:
60 bool InitializeP() override;
61
62private:
63 void WriteHeaderExtension(TextOutputWriter& aWriter) const override;
64 void WriteLineExtension(TextOutputWriter& aWriter, PointId aPointId) const override;
65
66 // Implementation details
67 std::map<std::string, PointId> mPlatforms{};
68 std::map<PointId, GridAsset> mAssets{};
69 std::map<PointId, Point> mPoints{};
70 std::map<std::string, std::string> mInputAssets{};
71};
72
73} // namespace coverage
74} // namespace wsf
75
76#endif // WSFCOVERAGEEXISTINGPLATFORMGRID_HPP
void SetType(WsfStringId aType)
Definition WsfObject.cpp:172
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
The main controller for a simulation.
Definition WsfSimulation.hpp:109
std::size_t GetSize() const override
Definition WsfCoverageExistingPlatformGrid.hpp:49
~ExistingPlatformGrid() override=default
ExistingPlatformGrid(const WsfScenario &aScenario)
Definition WsfCoverageExistingPlatformGrid.hpp:36
bool CreatesNewPlatforms() const override
Definition WsfCoverageExistingPlatformGrid.hpp:54
ExistingPlatformGrid(const ExistingPlatformGrid &aOther)=default
ExistingPlatformGrid * Clone() const override
Definition WsfCoverageExistingPlatformGrid.hpp:44
static constexpr const char * cTYPE
Definition WsfCoverageExistingPlatformGrid.hpp:57
bool IsStructured() const override
Definition WsfCoverageExistingPlatformGrid.hpp:55
An object that can be invoked for each point in a grid.
Definition WsfCoverageGridAction.hpp:30
Definition WsfCoverageAsset.hpp:37
Grid(const WsfScenario &aScenario)
Definition WsfCoverageGrid.cpp:31
A point in a coverage grid.
Definition WsfCoverageGridPoint.hpp:40
Definition WsfCoverageTextOutputWriter.hpp:34
Definition WsfCoverage.cpp:35
std::uint64_t PointId
Definition WsfCoverageGridPoint.hpp:33
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved