WSF
WsfSimpleCoverage.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 WSFCOVERAGESIMPLECOVERAGE_HPP
13#define WSFCOVERAGESIMPLECOVERAGE_HPP
14
15#include "wsf_coverage_export.h"
16
17#include <map>
18
19#include "WsfCoverageAsset.hpp"
22
23namespace wsf
24{
25namespace coverage
26{
27
28class AccessInterval;
29
31class WSF_COVERAGE_EXPORT SimpleCoverage : public Measure
32{
33public:
34 explicit SimpleCoverage(const WsfScenario& aScenario)
35 : Measure{aScenario}
36 {
38 }
39 SimpleCoverage(const SimpleCoverage& aOther) = default;
40 ~SimpleCoverage() override = default;
41
42 // Measure overrides
43 SimpleCoverage* Clone() const override { return new SimpleCoverage{*this}; }
44 double GetMeasuredValue(const GridAsset& aGridAsset) const override;
45 double GetDefaultValue() const override { return 0.0; }
46 std::string GetValueHeader() const override;
47
48 constexpr static const char* cTYPE{"WSF_SIMPLE_COVERAGE_MOE"};
49
50private:
51 bool InitializeP(Coverage& aCoverage) override;
52
53 void OnAccessIntervalComplete(const GridAsset& aGridAsset, const FreeAsset& aFreeAsset, const AccessInterval& aInterval);
54
55 std::map<GridAsset, double> mData{};
56};
57
58} // namespace coverage
59} // namespace wsf
60
61#endif // WSFCOVERAGESIMPLECOVERAGE_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
Definition WsfCoverageAccessInterval.hpp:28
Definition WsfCoverage.hpp:57
Definition WsfCoverageAsset.hpp:81
Definition WsfCoverageAsset.hpp:37
Measure(const WsfScenario &aScenario)
Definition WsfCoverageMeasure.hpp:45
SimpleCoverage(const SimpleCoverage &aOther)=default
SimpleCoverage * Clone() const override
Definition WsfSimpleCoverage.hpp:43
static constexpr const char * cTYPE
Definition WsfSimpleCoverage.hpp:48
double GetDefaultValue() const override
Return the default value of the measure.
Definition WsfSimpleCoverage.hpp:45
~SimpleCoverage() override=default
SimpleCoverage(const WsfScenario &aScenario)
Definition WsfSimpleCoverage.hpp:34
Definition WsfCoverage.cpp:35
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Copyrights Multiple, All Rights Reserved