WSF
Configuration.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 2017 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 CONFIGURATION_HPP
13#define CONFIGURATION_HPP
14
15#include <memory>
16#include <string>
17
18#include "post_processor_lib_export.h"
19
20#include "Options.hpp"
21#include "Report.hpp"
22
23#include "UtSpan.hpp"
24
25class POST_PROCESSOR_LIB_EXPORT Configuration
26{
27 public:
28
29 Configuration() = default;
30 Configuration(ut::span<char*> args);
31 Configuration(const Configuration& aConfiguration);
32 explicit Configuration(const std::string& aConfigurationFile);
33 ~Configuration() = default;
34
35 static void ShowUsage();
36
37 bool Execute();
38
39 Options& GetOptions() { return mOptions; }
40
41 void SetReportType(const std::string& aTypeString);
42 std::string GetReportTypeStr() const { return Report::GetTypeStr(mReportType); }
43
44 private:
45
46 void ProcessCommandLineOptions(ut::span<char*> args);
47 void ProcessConfigurationFile();
48 bool ValidateOptions(); // TODO-AWK
49
50 Report& CreateReport();
51 void InitReport();
52
53 Options mOptions{};
55 std::unique_ptr<Report> mReportPtr{nullptr};
56};
57
58#endif
std::string GetReportTypeStr() const
Definition Configuration.hpp:42
Configuration()=default
static void ShowUsage()
Definition Configuration.cpp:50
~Configuration()=default
Options & GetOptions()
Definition Configuration.hpp:39
bool Execute()
Definition Configuration.cpp:64
Definition Report.hpp:80
Type
Definition Report.hpp:112
@ cUNKNOWN
Definition Report.hpp:113
static std::string GetTypeStr(Report::Type aReportType)
Definition Report.cpp:674
Definition Options.hpp:21
Copyrights Multiple, All Rights Reserved