12#ifndef WSF_MULTIRESOLUTION_TYPES_HPP
13#define WSF_MULTIRESOLUTION_TYPES_HPP
15#include <unordered_map>
27template<
typename DerivedComponent>
47 template<
typename DerivedComponent>
56 template<
typename DerivedComponent>
57 void AddMultiresolutionType()
64 std::unordered_map<int, size_t> mRoleIndexMap;
69template<
typename DerivedComponent>
78 return ProcessAddOrEditCommandImpl(aInput, aPlatform, aIsAdding);
82 return ProcessDeleteCommandImpl(aInput, aPlatform);
87 template<
typename U = DerivedComponent>
88 typename std::enable_if<wsf::multiresolution::ComponentName<U>::cREQUIRES_USER_INPUT_NAME,
bool>::type
89 ProcessAddOrEditCommandImpl(UtInput& aInput,
WsfPlatform& aPlatform,
bool aIsAdding)
94 template<
typename U = DerivedComponent>
95 typename std::enable_if<!wsf::multiresolution::ComponentName<U>::cREQUIRES_USER_INPUT_NAME,
bool>::type
96 ProcessAddOrEditCommandImpl(UtInput& aInput,
WsfPlatform& aPlatform,
bool aIsAdding)
101 template<
typename U = DerivedComponent>
102 typename std::enable_if<wsf::multiresolution::ComponentName<U>::cREQUIRES_USER_INPUT_NAME,
bool>::type
103 ProcessDeleteCommandImpl(UtInput& aInput, WsfPlatform& aPlatform)
108 template<
typename U = DerivedComponent>
109 typename std::enable_if<!wsf::multiresolution::ComponentName<U>::cREQUIRES_USER_INPUT_NAME,
bool>::type
110 ProcessDeleteCommandImpl(UtInput& aInput, WsfPlatform& aPlatform)
118template<
typename DerivedComponent>
126template<
typename DerivedComponent>
134template<
typename DerivedComponent>
139 wsf::multiresolution::CommandName<DerivedComponent>())
WsfScenario & GetScenario() const
Returns a reference to the scenario to which this factory is registered.
Definition WsfComponentFactory.hpp:37
WsfComponentFactory()
Definition WsfComponentFactory.hpp:56
Definition WsfMultiresolutionTypes.hpp:41
void AddedToScenario() override
Definition WsfMultiresolutionTypes.cpp:14
WsfMultiresolutionTypes< DerivedComponent > & GetMultiresolutionTypes() const
Definition WsfMultiresolutionTypes.hpp:48
Definition WsfMultiresolutionTypes.hpp:29
static WsfMultiresolutionTypes< DerivedComponent > & Get(WsfScenario &aScenario)
Definition WsfMultiresolutionTypes.hpp:119
WsfMultiresolutionTypes(WsfScenario &aScenario)
Definition WsfMultiresolutionTypes.hpp:135
@ cREDEFINITION_ALLOWED
Definition WsfObjectTypeListBase.hpp:99
WsfObjectTypeListBase(const WsfObjectTypeListBase &)=delete
bool Add(WsfStringId aId, std::unique_ptr< WsfMultiresolutionPlatformComponent< DerivedComponent > > aDefinitionPtr)
Definition WsfObjectTypeList.hpp:91
WsfObjectTypeList(WsfScenario &aScenario, unsigned int aFlags, const std::string &aBlockName)
Definition WsfObjectTypeList.hpp:76
WsfScenarioExtension()
Definition WsfScenarioExtension.cpp:21
WsfScenario & GetScenario() const
Definition WsfScenarioExtension.hpp:46
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
WsfScenarioExtension & GetExtension(const std::string &aName) const
Definition WsfScenario.cpp:814
void RegisterComponentFactory(std::unique_ptr< WsfComponentFactoryBase > aFactoryPtr)
Definition WsfScenario.cpp:850
void AddTypeList(std::unique_ptr< WsfObjectTypeListBaseI > aTypeListPtr)
Definition WsfScenario.cpp:1326
std::vector< WsfObjectTypeListBaseI * > GetTypeLists() const
Definition WsfScenario.hpp:232
Definition WsfMultiresolutionTypes.hpp:71
bool ProcessDeleteCommand(UtInput &aInput, WsfPlatform &aPlatform) override
Definition WsfMultiresolutionTypes.hpp:80
static constexpr int cMULTIRESOLUTION_COMPONENT_ROLE
Definition WsfMultiresolutionTypes.hpp:73
bool ProcessAddOrEditCommand(UtInput &aInput, WsfPlatform &aPlatform, bool aIsAdding) override
Definition WsfMultiresolutionTypes.hpp:76
str types
Definition MessageDefines_Generate.py:19
Definition WsfMultiresolutionTypes.hpp:68
constexpr auto cEXTENSION_NAME
Definition ComponentNameHelper.hpp:46
std::string BaseTypeName()
This name, associated with DerivedComponent, is used as the base input type for scenario input.
Definition ComponentNameHelper.hpp:81
Function definitions for those who need run-time access to the version.
Definition WsfComm.cpp:32
Definition WsfComponentRoles.hpp:60