WSF
WsfVisualPart.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 2003-2015 The Boeing 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 WSFVISUALPART_HPP
13#define WSFVISUALPART_HPP
14
15#include "wsf_export.h"
16
17#include <vector>
18
19class UtInput;
21
26{
27public:
28 WsfVisualPart(const WsfScenario& aScenario);
30 ~WsfVisualPart() override;
31
33
34 WsfComponent* CloneComponent() const override { return Clone(); }
36 const int* GetComponentRoles() const override;
37 void* QueryInterface(int aRole) override;
39
41
42 const char* GetScriptClassName() const override;
45 WsfVisualPart* Clone() const override { return new WsfVisualPart(*this); }
46 bool Initialize(double aSimTime) override;
47 bool ProcessInput(UtInput& aInput) override;
48 void Update(double aSimTime) override;
50
52 double GetUpdateInterval() const override { return mUpdateInterval; }
53
55 void SetIcon(const std::string& aIcon) { mIcon = aIcon; }
57 const std::string& GetIcon() const { return mIcon; }
58
62 void SetUpdateInterval(double aUpdateInterval) override { mUpdateInterval = aUpdateInterval; }
63
65
66 void TurnOff(double aSimTime) override;
67 void TurnOn(double aSimTime) override;
68 void SetNonOperational(double aSimTime) override;
69 void SetOperational(double aSimTime) override;
70 void PartBroken(double aSimTime) override;
71
72protected:
73 WsfVisualPart(const WsfVisualPart& aSrc);
74
75private:
78 double mUpdateInterval;
79
81 unsigned int mRequestId;
82
84 std::vector<unsigned int> mActiveRequestList;
85
86 std::string mIcon;
87};
88
90
91#endif
@ cWSF_INITIALIZE_ORDER_VISUAL_PART
Definition WsfComponentRoles.hpp:179
#define WSF_DECLARE_COMPONENT_ROLE_TYPE(TYPE, ROLE)
Definition WsfComponentRoles.hpp:44
@ cWSF_COMPONENT_VISUAL
A 'visual_part' component (WsfVisualPart).
Definition WsfComponentRoles.hpp:106
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
bool ProcessInput(UtInput &aInput) override
Definition WsfArticulatedPart.cpp:205
bool Initialize(double aSimTime) override
Definition WsfArticulatedPart.cpp:170
void * QueryInterface(int aRole) override
Definition WsfArticulatedPart.cpp:159
WsfArticulatedPart(const WsfScenario &aScenario, int aPartType)
Definition WsfArticulatedPart.cpp:29
const char * GetScriptClassName() const override
Definition WsfArticulatedPart.cpp:1074
const int * GetComponentRoles() const override
Definition WsfArticulatedPart.cpp:153
Definition WsfComponent.hpp:39
virtual WsfObject * Clone() const =0
virtual void Update(double aSimTime)
Definition WsfPlatformPart.cpp:322
virtual void SetOperational(double aSimTime)
Definition WsfPlatformPart.cpp:661
virtual void PartBroken(double aSimTime)
Definition WsfPlatformPart.cpp:232
virtual void TurnOff(double aSimTime)
Definition WsfPlatformPart.cpp:606
virtual void TurnOn(double aSimTime)
Definition WsfPlatformPart.cpp:622
virtual void SetNonOperational(double aSimTime)
Definition WsfPlatformPart.cpp:642
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfVisualPart.hpp:26
void SetUpdateInterval(double aUpdateInterval) override
Definition WsfVisualPart.hpp:62
WsfComponent * CloneComponent() const override
Definition WsfVisualPart.hpp:34
WsfVisualPart(const WsfScenario &aScenario)
Definition WsfVisualPart.cpp:25
WsfVisualPart & operator=(const WsfVisualPart &)=delete
WsfVisualPart * Clone() const override
Definition WsfVisualPart.hpp:45
const std::string & GetIcon() const
Get the display icon.
Definition WsfVisualPart.hpp:57
int GetComponentInitializationOrder() const override
Definition WsfVisualPart.hpp:35
void SetIcon(const std::string &aIcon)
Set the displayed icon.
Definition WsfVisualPart.hpp:55
double GetUpdateInterval() const override
Get the update interval.
Definition WsfVisualPart.hpp:52
Copyrights Multiple, All Rights Reserved