WSF
wsf::space::OrbitalTargetingCostTypes Class Reference

#include <WsfOrbitalTargetingCostTypes.hpp>

Public Types

using FactoryFunction = std::function<std::unique_ptr<OrbitalTargetingCost>(const std::string&)>

Public Member Functions

 OrbitalTargetingCostTypes ()
bool LoadInstance (UtInput &aInput, std::unique_ptr< OrbitalTargetingCost > &aOrbitalTargetingCostPtr) const
void AddObjectFactory (FactoryFunction aFactoryFunction)
std::unique_ptr< OrbitalTargetingCostCreateInstance (const std::string &aTypeName) const

Static Public Member Functions

static OrbitalTargetingCostTypesGet (WsfScenario &aScenario)
 Return a modifiable reference to the orbital targeting cost function type list associated with the given aScenario.
static const OrbitalTargetingCostTypesGet (const WsfScenario &aScenario)
 Return a const reference to the orbital targeting cost function type list associated with the given aScenario.

Member Typedef Documentation

◆ FactoryFunction

using wsf::space::OrbitalTargetingCostTypes::FactoryFunction = std::function<std::unique_ptr<OrbitalTargetingCost>(const std::string&)>

Constructor & Destructor Documentation

◆ OrbitalTargetingCostTypes()

wsf::space::OrbitalTargetingCostTypes::OrbitalTargetingCostTypes ( )

References AddObjectFactory().

Referenced by Get(), and Get().

Member Function Documentation

◆ AddObjectFactory()

void wsf::space::OrbitalTargetingCostTypes::AddObjectFactory ( FactoryFunction aFactoryFunction)

Add an object factory for creating an instance of a fundamental type. The provided aFactoryFunction should be added only once.

Parameters
aFactoryFunctionAn object factory for creating instances of a fundamental type.

Referenced by OrbitalTargetingCostTypes().

◆ CreateInstance()

std::unique_ptr< OrbitalTargetingCost > wsf::space::OrbitalTargetingCostTypes::CreateInstance ( const std::string & aTypeName) const

Create an orbital targeting cost instance with the given aTypeName.

Parameters
aTypeNameThe name of the type of orbital targeting cost to create.
Returns
An instance of the given aTypeName is this object recognizes the type; nullptr otherwise.

Referenced by LoadInstance().

◆ Get() [1/2]

const OrbitalTargetingCostTypes & wsf::space::OrbitalTargetingCostTypes::Get ( const WsfScenario & aScenario)
static

Return a const reference to the orbital targeting cost function type list associated with the given aScenario.

References WsfSpaceExtension::Get(), WsfSpaceExtension::GetOrbitalTargetingCostTypes(), and OrbitalTargetingCostTypes().

◆ Get() [2/2]

OrbitalTargetingCostTypes & wsf::space::OrbitalTargetingCostTypes::Get ( WsfScenario & aScenario)
static

Return a modifiable reference to the orbital targeting cost function type list associated with the given aScenario.

References WsfSpaceExtension::Get(), WsfSpaceExtension::GetOrbitalTargetingCostTypes(), and OrbitalTargetingCostTypes().

◆ LoadInstance()

bool wsf::space::OrbitalTargetingCostTypes::LoadInstance ( UtInput & aInput,
std::unique_ptr< OrbitalTargetingCost > & aOrbitalTargetingCostPtr ) const

Process orbital targeting cost function type input.

Parameters
aInputThe current input stream.
aOrbitalTargetingCostPtrThe pointer to the orbital targeting cost function.
Returns
true if the current command was recognized and processes; false otherwise.

References CreateInstance().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved