|
WSF
|
A base class template for defining multiresolution WsfPlatformComponent types. More...
#include <WsfMultiresolutionPlatformComponent.hpp>


Public Member Functions | |
| WsfMultiresolutionPlatformComponent () | |
| Public Member Functions inherited from WsfComponentT< WsfPlatform > | |
| WsfComponentT () | |
| WsfComponentT (const WsfComponentT &) noexcept | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| virtual void | ComponentParentChanged (ParentType *aParentPtr) |
| ParentType * | GetComponentParent () const |
| void | SetComponentParent (ParentType *aParentPtr) |
| Public Member Functions inherited from WsfComponent | |
| virtual | ~WsfComponent ()=default |
| virtual WsfComponent * | CloneComponent () const =0 |
| virtual int | GetComponentInitializationOrder () const |
| template<typename T> | |
| bool | QueryInterfaceT (T *&aRolePtr) |
| bool | ComponentHasRole (int aRole) |
| Returns true if the component has the specified role. | |
| virtual bool | Initialize (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual void | PreInput () |
| Public Member Functions inherited from WsfObject | |
| WsfObject () | |
| This is the constructor for the WsfObject class. | |
| ~WsfObject () override | |
| This is the destructor for the WsfObject class. | |
| const char * | GetScriptClassName () const override |
| virtual WsfObject * | Clone () const =0 |
| const std::string & | GetType () const |
| WsfStringId | GetTypeId () const |
| Get the string ID of the 'type' of the object. | |
| void | SetType (WsfStringId aType) |
| const std::string & | GetBaseType () const |
| WsfStringId | GetBaseTypeId () const |
| const TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (const WsfObject &aRhs) |
| Assignment operator. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
Framework methods. | |
| bool | ProcessInput (UtInput &aInput) override |
| bool | PreInitialize (double aSimTime) override |
| virtual std::unique_ptr< DerivedComponent > | GetModel () const =0 |
| double | GetFidelity () const |
Component infrastructure methods. | |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| void * | QueryInterface (int aRole) override |
| static WsfMultiresolutionPlatformComponent< DerivedComponent > * | Find (const WsfPlatform &aParent) |
Additional Inherited Members | |
| Public Types inherited from WsfComponentT< WsfPlatform > | |
| typedef WsfPlatform | ParentType |
| This is needed to support the WsfComponentList template. | |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
A base class template for defining multiresolution WsfPlatformComponent types.
The purpose of the base class is to manage input and model installation on a platform. The input to a multiresolution model is a fidelity parameter and will be extended to other model attributes. The fidelity may be specified directly in the input of this class, or externally using WsfMultiresolutionMultirunTable. These inputs are used by the derived type to create a model (returned from GetModel), which is then installed on the platform.
| DerivedComponent | A type deriving from WsfPlatformComponent |
| WsfMultiresolutionPlatformComponent< DerivedComponent >::WsfMultiresolutionPlatformComponent | ( | ) |
References wsf::multiresolution::CommandName(), WsfObject::SetName(), and WsfObject::WsfObject().
Referenced by Find().
|
static |
|
inlineoverridevirtual |
Returns the component's name. Each component in a component list has a unique name. Names are usually defined by the user, but they may also be generated by code and prefixed with a '#' to guarantee no collisions with user-defined names.
Implements WsfComponent.
References WsfObject::GetNameId().
|
overridevirtual |
Returns a zero-terminated array of component roles. Note that the array should be in decreasing order of specificity and should generally the inheritance hierarchy. The first entry should be the components 'primary' role. For example a sensor would do the following:
Implements WsfComponent.
References cWSF_COMPONENT_NULL.
|
protected |
References WsfMultiresolutionMultirunTable::Find(), WsfComponentT< WsfPlatform >::GetComponentParent(), WsfMultiresolutionMultirunTable::GetFidelity(), WsfObject::GetName(), and wsf::multiresolution::RequiresUserInputName().
|
protectedpure virtual |
The main responsibility of derived classes is to implement this method. It returns the model that will be installed on the platform by the base class.
Referenced by PreInitialize().
|
overridevirtual |
Perform pre-initializion function. This is called by WsfPlatform::Initialize prior to actually initializing the components on a platform (i.e.: calling Initialize and Initialize2 for each component). The primary reason for this method is to allow components to add other components that will then be subsequently initialized. The component may examine the component list and add components, but it must not assume ANYTHING about the actual state of the component.
| aSimTime | The current simulation time. |
Reimplemented from WsfComponent.
References wsf::multiresolution::CommandName(), WsfComponentT< WsfPlatform >::GetComponentParent(), GetModel(), WsfObject::GetName(), ok, and WsfComponent::PreInitialize().
|
overridevirtual |
Evaluate the current input command and determine if it is one processed by the component. The component should get the current command from the input stream and determine if it is one that it recognizes. If it does not recognize the command then it should leave the command in the input stream and return false. If it does recognize the command then it should process the command and return true. If invalid arguments are encountered then it should throw an exception.
| aInput | The input stream. |
| UtInput::ExceptionBase | if an invalid input was encountered. |
Reimplemented from WsfComponent.
Reimplemented in WsfMultiresolutionWrapperMetaModel< DerivedComponent >.
References wsf::multiresolution::CommandName(), WsfComponent::ProcessInput(), and WsfObject::ProcessInput().
Referenced by WsfMultiresolutionWrapperMetaModel< DerivedComponent >::ProcessInput().
|
overridevirtual |
Requests a component's role interface. A component can support one or more roles.
| aRole | The role whose interface is to be returned. |
Implements WsfComponent.