WSF
WsfOrbitalPropagatorTypes.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 WSFORBITALPROPAGATORTYPES_HPP
13#define WSFORBITALPROPAGATORTYPES_HPP
14
15#include "wsf_space_export.h"
16
17#include <functional>
18#include <list>
19#include <memory>
20#include <string>
21
22class UtInput;
23class UtOrbitalPropagatorBase;
24class WsfScenario;
25
26class WSF_SPACE_EXPORT WsfOrbitalPropagatorTypes
27{
28public:
30
31 static WsfOrbitalPropagatorTypes& Get(WsfScenario& aScenario);
32 static const WsfOrbitalPropagatorTypes& Get(const WsfScenario& aScenario);
34
35 using FactoryPtr = std::function<std::unique_ptr<UtOrbitalPropagatorBase>(const std::string&)>;
36 using ObjectFactoryList = std::list<FactoryPtr>;
37
38 bool LoadInstance(UtInput& aInput, std::unique_ptr<UtOrbitalPropagatorBase>& aOrbitalPropagatorPtr) const;
39
40 void AddObjectFactory(FactoryPtr aFactoryPtr);
41 std::unique_ptr<UtOrbitalPropagatorBase> CreateInstance(const std::string& aTypeName) const;
42
43private:
44 ObjectFactoryList mObjectFactoryList;
45};
46
47#endif
Definition WsfOrbitalPropagatorTypes.hpp:27
bool LoadInstance(UtInput &aInput, std::unique_ptr< UtOrbitalPropagatorBase > &aOrbitalPropagatorPtr) const
Definition WsfOrbitalPropagatorTypes.cpp:54
std::function< std::unique_ptr< UtOrbitalPropagatorBase >(const std::string &)> FactoryPtr
Definition WsfOrbitalPropagatorTypes.hpp:35
static WsfOrbitalPropagatorTypes & Get(WsfScenario &aScenario)
Return a modifiable reference to the type list associated with the specified scenario.
Definition WsfOrbitalPropagatorTypes.cpp:23
void AddObjectFactory(FactoryPtr aFactoryPtr)
Definition WsfOrbitalPropagatorTypes.cpp:79
std::list< FactoryPtr > ObjectFactoryList
Definition WsfOrbitalPropagatorTypes.hpp:36
std::unique_ptr< UtOrbitalPropagatorBase > CreateInstance(const std::string &aTypeName) const
Definition WsfOrbitalPropagatorTypes.cpp:36
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Copyrights Multiple, All Rights Reserved