diff --git a/docs-mini/README.introduction b/docs-mini/README.introduction index e3ba7f9f9..8d8030f47 100644 --- a/docs-mini/README.introduction +++ b/docs-mini/README.introduction @@ -57,11 +57,15 @@ SGSubsystem and define at least a small set of functions: FGFX(); virtual ~FGFX(); - virtual void init(); - virtual void reinit(); - virtual void bind(); - virtual void unbind(); - virtual void update(double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "fx"; } }; The init() functions should make sure everything is set and ready so the diff --git a/src/AIModel/AIManager.hxx b/src/AIModel/AIManager.hxx index 96cff2bf9..ae292b598 100644 --- a/src/AIModel/AIManager.hxx +++ b/src/AIModel/AIManager.hxx @@ -41,14 +41,18 @@ public: FGAIManager(); virtual ~FGAIManager(); + // Subsystem API. + void bind() override; void init() override; - void shutdown() override; void postinit() override; void reinit() override; - void bind() override; + void shutdown() override; void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* subsystemName() { return "ai-model"; } + void updateLOD(SGPropertyNode* node); void attach(FGAIBase *model); @@ -89,8 +93,6 @@ public: double calcRangeFt(const SGVec3d& aCartPos, const FGAIBase* aObject) const; - static const char* subsystemName() { return "ai-model"; } - /** * @brief Retrieve the representation of the user's aircraft in the AI manager * the position and velocity of this object are slaved to the user's aircraft, diff --git a/src/AIModel/performancedb.hxx b/src/AIModel/performancedb.hxx index e5bbcdf9a..9075eaa39 100644 --- a/src/AIModel/performancedb.hxx +++ b/src/AIModel/performancedb.hxx @@ -25,10 +25,13 @@ public: PerformanceDB(); virtual ~PerformanceDB(); - virtual void init(); - virtual void shutdown(); + // Subsystem API. + void init() override; + void shutdown() override; + void update(double dt) override; - virtual void update(double dt); + // Subsystem identification. + static const char* subsystemName() { return "aircraft-performance-db"; } bool havePerformanceDataForAircraftType(const std::string& acType) const; @@ -40,8 +43,6 @@ public: PerformanceData* getDefaultPerformance() const; - static const char* subsystemName() { return "aircraft-performance-db"; } - private: void load(const SGPath& path); diff --git a/src/AIModel/submodel.hxx b/src/AIModel/submodel.hxx index 0ce027c40..4557ffc7b 100644 --- a/src/AIModel/submodel.hxx +++ b/src/AIModel/submodel.hxx @@ -96,14 +96,15 @@ public: FGSubmodelMgr(); ~FGSubmodelMgr() override; - void load(); - + // Subsystem API. + void bind() override; void init() override; void postinit() override; - void bind() override; + void shutdown() override; void unbind() override; void update(double dt) override; - void shutdown() override; + + void load(); private: typedef std::vector submodel_vector_type; diff --git a/src/ATC/atc_mgr.hxx b/src/ATC/atc_mgr.hxx index 9fa77ee63..fb1d50b5d 100644 --- a/src/ATC/atc_mgr.hxx +++ b/src/ATC/atc_mgr.hxx @@ -51,12 +51,14 @@ private: public: FGATCManager(); ~FGATCManager(); + + // Subsystem API. void postinit() override; void shutdown() override; + void update(double time) override; void addController(FGATCController *controller); void removeController(FGATCController* controller); - void update(double time); }; #endif // _ATC_MRG_HXX_ diff --git a/src/Aircraft/FlightHistory.hxx b/src/Aircraft/FlightHistory.hxx index 5d6950b14..b791cf89d 100644 --- a/src/Aircraft/FlightHistory.hxx +++ b/src/Aircraft/FlightHistory.hxx @@ -57,10 +57,11 @@ public: FGFlightHistory(); virtual ~FGFlightHistory(); - virtual void init(); - virtual void shutdown(); - virtual void reinit(); - virtual void update(double dt); + // Subsystem API. + void init() override; + void reinit() override; + void shutdown() override; + void update(double dt) override; PagedPathForHistory_ptr pagedPathForHistory(size_t max_entries, size_t newerThan = 0) const; /** diff --git a/src/Aircraft/controls.hxx b/src/Aircraft/controls.hxx index 970cc8c11..6c7cb35a4 100644 --- a/src/Aircraft/controls.hxx +++ b/src/Aircraft/controls.hxx @@ -257,12 +257,15 @@ public: FGControls(); ~FGControls(); - // Implementation of SGSubsystem. - void init (); - void bind (); - void unbind (); - void update (double dt); - virtual void reinit(); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "controls"; } // Reset function void reset_all(void); @@ -636,8 +639,6 @@ public: // controls/autoflight/autopilot[n]/ void set_autopilot_engage( int ap, bool val ); - static const char* subsystemName() { return "controls"; } - private: inline void do_autocoordination() { // check for autocoordination diff --git a/src/Aircraft/replay.hxx b/src/Aircraft/replay.hxx index de8f7be0c..3f559740f 100644 --- a/src/Aircraft/replay.hxx +++ b/src/Aircraft/replay.hxx @@ -65,17 +65,21 @@ public: FGReplay (); virtual ~FGReplay(); - virtual void init(); - virtual void reinit(); - virtual void bind(); - virtual void unbind(); - virtual void update( double dt ); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "replay"; } + bool start(bool NewTape=false); bool saveTape(const SGPropertyNode* ConfigData); bool loadTape(const SGPropertyNode* ConfigData); - static const char* subsystemName() { return "replay"; } private: void clear(); FGReplayData* record(double time); diff --git a/src/Airports/airportdynamicsmanager.hxx b/src/Airports/airportdynamicsmanager.hxx index 691325444..195c34fc2 100644 --- a/src/Airports/airportdynamicsmanager.hxx +++ b/src/Airports/airportdynamicsmanager.hxx @@ -38,10 +38,14 @@ public: AirportDynamicsManager(); virtual ~AirportDynamicsManager(); - virtual void init(); - virtual void shutdown(); - virtual void update (double dt); - virtual void reinit(); + // Subsystem API. + void init() override; + void reinit() override; + void shutdown() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "airport-dynamics"; } static FGAirportDynamicsRef find(const std::string& icao); @@ -49,8 +53,6 @@ public: FGAirportDynamicsRef dynamicsForICAO(const std::string& icao); - static const char* subsystemName() { return "airport-dynamics"; } - private: typedef std::map ICAODynamicsDict; ICAODynamicsDict m_dynamics; diff --git a/src/Autopilot/autopilot.hxx b/src/Autopilot/autopilot.hxx index 3962081a8..fa6bf0945 100644 --- a/src/Autopilot/autopilot.hxx +++ b/src/Autopilot/autopilot.hxx @@ -40,9 +40,10 @@ public: Autopilot( SGPropertyNode_ptr rootNode, SGPropertyNode_ptr configNode = NULL ); ~Autopilot(); - void bind(); - void unbind(); - void update( double dt ); + // Subsystem API. + void bind() override; + void unbind() override; + void update(double dt) override; void set_serviceable( bool value ) { _serviceable = value; } bool is_serviceable() const { return _serviceable; } diff --git a/src/Autopilot/autopilotgroup.cxx b/src/Autopilot/autopilotgroup.cxx index 0176f4598..b41ee4377 100644 --- a/src/Autopilot/autopilotgroup.cxx +++ b/src/Autopilot/autopilotgroup.cxx @@ -48,13 +48,15 @@ public: _nodeName(nodeName) {} + // Subsystem API. + void init() override; + InitStatus incrementalInit() override; + void reinit() override; + virtual void addAutopilot( const std::string& name, SGPropertyNode_ptr apNode, SGPropertyNode_ptr config ); virtual void removeAutopilot( const std::string & name ); - void init(); - InitStatus incrementalInit(); - void reinit(); private: void initFrom( SGPropertyNode_ptr rootNode, const char * childName ); diff --git a/src/Autopilot/component.hxx b/src/Autopilot/component.hxx index 4afdb4658..8dfbadb57 100644 --- a/src/Autopilot/component.hxx +++ b/src/Autopilot/component.hxx @@ -48,11 +48,6 @@ protected: const std::string& cfg_name, SGPropertyNode& prop_root ); - /** - * @brief the implementation of the update() method of the SGSubsystem - */ - virtual void update( double dt ); - /** * @brief pure virtual function to be implemented by the derived classes. Gets called from * the update method if it's not disabled with the firstTime parameter set to true if this @@ -93,6 +88,9 @@ public: */ virtual ~Component(); + // Subsystem API. + void update(double dt) override; + /** * @brief configure this component from a property node. Iterates through * all nodes found as children under configNode and calls configure diff --git a/src/Autopilot/route_mgr.hxx b/src/Autopilot/route_mgr.hxx index 59840f515..2f2ecd6f7 100644 --- a/src/Autopilot/route_mgr.hxx +++ b/src/Autopilot/route_mgr.hxx @@ -45,11 +45,15 @@ public: FGRouteMgr(); ~FGRouteMgr(); - void init (); - void postinit (); - void bind (); - void unbind (); - void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void postinit() override; + void unbind() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "route-manager"; } bool isRouteActive() const; @@ -100,8 +104,6 @@ public: flightgear::WayptRef waypointFromString(const std::string& target); - static const char* subsystemName() { return "route-manager"; } - private: bool commandDefineUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root); bool commandDeleteUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root); diff --git a/src/Canvas/canvas_mgr.hxx b/src/Canvas/canvas_mgr.hxx index a82e1be25..4cc92c11f 100644 --- a/src/Canvas/canvas_mgr.hxx +++ b/src/Canvas/canvas_mgr.hxx @@ -27,8 +27,12 @@ class CanvasMgr : public simgear::canvas::CanvasMgr public: CanvasMgr(); - virtual void init(); - virtual void shutdown(); + // Subsystem API. + void init() override; + void shutdown() override; + + // Subsystem identification. + static const char* subsystemName() { return "Canvas"; } /** * Get OpenGL texture name for given canvas @@ -41,8 +45,6 @@ public: */ unsigned int getCanvasTexId(const simgear::canvas::CanvasPtr& canvas) const; - static const char* subsystemName() { return "Canvas"; } - protected: osg::observer_ptr _gui_camera; diff --git a/src/Canvas/gui_mgr.hxx b/src/Canvas/gui_mgr.hxx index 5c78950af..68be7b5eb 100644 --- a/src/Canvas/gui_mgr.hxx +++ b/src/Canvas/gui_mgr.hxx @@ -39,13 +39,13 @@ class GUIMgr : public SGSubsystem public: GUIMgr(); + // Subsystem API. + void init() override; + void shutdown() override; + void update(double dt) override; + simgear::canvas::WindowPtr createWindow(const std::string& name = ""); - virtual void init(); - virtual void shutdown(); - - virtual void update(double dt); - /** * Get simgear::canvas::Group containing all windows */ diff --git a/src/Cockpit/NavDisplay.hxx b/src/Cockpit/NavDisplay.hxx index 6bf73e72c..c309e614d 100644 --- a/src/Cockpit/NavDisplay.hxx +++ b/src/Cockpit/NavDisplay.hxx @@ -62,8 +62,9 @@ public: NavDisplay(SGPropertyNode *node); virtual ~NavDisplay(); - virtual void init(); - virtual void update(double dt); + // Subsystem API. + void init() override; + void update(double dt) override; void invalidatePositionedCache() { diff --git a/src/Cockpit/agradar.hxx b/src/Cockpit/agradar.hxx index a95812a4c..184655a6b 100644 --- a/src/Cockpit/agradar.hxx +++ b/src/Cockpit/agradar.hxx @@ -37,8 +37,9 @@ public: agRadar (); virtual ~agRadar (); - virtual void init (); - virtual void update (double dt); + // Subsystem API. + void init() override; + void update(double dt) override; void setUserPos(); void setUserVec(double az, double el); diff --git a/src/Cockpit/cockpitDisplayManager.hxx b/src/Cockpit/cockpitDisplayManager.hxx index fe59b7007..4ac1419be 100644 --- a/src/Cockpit/cockpitDisplayManager.hxx +++ b/src/Cockpit/cockpitDisplayManager.hxx @@ -39,8 +39,9 @@ public: CockpitDisplayManager (); virtual ~CockpitDisplayManager (); - virtual void init(); - virtual InitStatus incrementalInit(); + // Subsystem API. + void init() override; + InitStatus incrementalInit() override; private: bool build (SGPropertyNode* config_props); diff --git a/src/Cockpit/wxradar.hxx b/src/Cockpit/wxradar.hxx index 086ecb51c..5a4fe7609 100644 --- a/src/Cockpit/wxradar.hxx +++ b/src/Cockpit/wxradar.hxx @@ -44,10 +44,11 @@ public: wxRadarBg(); virtual ~wxRadarBg(); - virtual void init(); - virtual void shutdown(); + // Subsystem API. + void init() override; + void shutdown() override; + void update(double dt) override; - virtual void update(double dt); virtual void valueChanged(SGPropertyNode *); protected: diff --git a/src/Environment/environment_ctrl.cxx b/src/Environment/environment_ctrl.cxx index 98f59cb9e..a50d569d0 100644 --- a/src/Environment/environment_ctrl.cxx +++ b/src/Environment/environment_ctrl.cxx @@ -106,12 +106,13 @@ class LayerInterpolateControllerImplementation : public LayerInterpolateControll public: LayerInterpolateControllerImplementation( SGPropertyNode_ptr rootNode ); - virtual void init (); - virtual void reinit (); - virtual void postinit(); - virtual void bind(); - virtual void unbind(); - virtual void update (double delta_time_sec); + // Subsystem API. + void bind() override; + void init() override; + void postinit() override; + void reinit() override; + void unbind() override; + void update(double delta_time_sec) override; private: SGPropertyNode_ptr _rootNode; diff --git a/src/Environment/environment_mgr.hxx b/src/Environment/environment_mgr.hxx index 5948112a5..71dd1f649 100644 --- a/src/Environment/environment_mgr.hxx +++ b/src/Environment/environment_mgr.hxx @@ -46,12 +46,13 @@ public: FGEnvironmentMgr (); virtual ~FGEnvironmentMgr (); - virtual InitStatus incrementalInit (); - virtual void reinit (); - virtual void shutdown (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + InitStatus incrementalInit() override; + void reinit() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; /** * Get the environment information for the plane's current position. diff --git a/src/Environment/ephemeris.hxx b/src/Environment/ephemeris.hxx index 0e51b0007..648ef199d 100644 --- a/src/Environment/ephemeris.hxx +++ b/src/Environment/ephemeris.hxx @@ -31,7 +31,7 @@ class SGEphemeris; class SGPropertyNode; /** - * Wrap SGEphemeris in a susbsytem/property interface + * Wrap SGEphemeris in a subsystem/property interface */ class Ephemeris : public SGSubsystem { @@ -39,13 +39,15 @@ public: Ephemeris(); ~Ephemeris(); - virtual void bind(); - virtual void unbind(); - virtual void update(double dt); - virtual void init(); - virtual void shutdown(); - virtual void postinit(); + // Subsystem API. + void bind() override; + void init() override; + void postinit() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; + // Subsystem identification. static const char* subsystemName() { return "ephemeris"; } SGEphemeris* data(); diff --git a/src/Environment/magvarmanager.hxx b/src/Environment/magvarmanager.hxx index 202c00d97..73c4ac32a 100644 --- a/src/Environment/magvarmanager.hxx +++ b/src/Environment/magvarmanager.hxx @@ -34,11 +34,11 @@ public: FGMagVarManager(); virtual ~FGMagVarManager(); - virtual void init(); - virtual void bind(); - virtual void unbind(); - - virtual void update(double dt); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; private: std::unique_ptr _magVar; diff --git a/src/Environment/precipitation_mgr.hxx b/src/Environment/precipitation_mgr.hxx index 360ee3ff5..c71f01ab3 100644 --- a/src/Environment/precipitation_mgr.hxx +++ b/src/Environment/precipitation_mgr.hxx @@ -45,11 +45,11 @@ public: FGPrecipitationMgr(); virtual ~FGPrecipitationMgr(); - // SGSubsystem methods - virtual void bind (); - virtual void unbind (); - virtual void init (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; void setupSceneGraph(void); void setPrecipitationLevel(double l); diff --git a/src/Environment/realwx_ctrl.cxx b/src/Environment/realwx_ctrl.cxx index c1e0f44e6..c7066fd97 100644 --- a/src/Environment/realwx_ctrl.cxx +++ b/src/Environment/realwx_ctrl.cxx @@ -155,9 +155,13 @@ public: BasicRealWxController( SGPropertyNode_ptr rootNode, MetarRequester * metarRequester ); virtual ~BasicRealWxController (); - virtual void init (); - virtual void reinit (); - virtual void shutdown (); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; /** * Create a metar-property binding at the specified property path, @@ -173,10 +177,6 @@ public: MetarPropertiesList::iterator findMetarAtPath(const string &propPath); protected: - void bind(); - void unbind(); - void update( double dt ); - void checkNearbyMetar(); long getMetarMaxAgeMin() const { return _max_age_n == NULL ? 0 : _max_age_n->getLongValue(); } diff --git a/src/Environment/ridge_lift.hxx b/src/Environment/ridge_lift.hxx index 26dc5e309..5518f1668 100644 --- a/src/Environment/ridge_lift.hxx +++ b/src/Environment/ridge_lift.hxx @@ -44,10 +44,11 @@ public: FGRidgeLift(); ~FGRidgeLift(); - virtual void bind(); - virtual void unbind(); - virtual void update(double dt); - virtual void init(); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; inline double getStrength() const { return strength; }; diff --git a/src/Environment/terrainsampler.cxx b/src/Environment/terrainsampler.cxx index f298b25df..6179b0700 100644 --- a/src/Environment/terrainsampler.cxx +++ b/src/Environment/terrainsampler.cxx @@ -49,11 +49,13 @@ class AreaSampler : public SGSubsystem public: AreaSampler( SGPropertyNode_ptr rootNode ); virtual ~AreaSampler(); - void update( double dt ); - void bind(); - void unbind(); - void init(); - void reinit(); + + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; int getElevationHistogramStep() const { return _elevationHistogramStep; } void setElevationHistograpStep( int value ) { @@ -322,13 +324,14 @@ public: TerrainSamplerImplementation ( SGPropertyNode_ptr rootNode ); virtual ~TerrainSamplerImplementation (); - virtual void init (); - virtual InitStatus incrementalInit (); - virtual void postinit(); - virtual void reinit (); - virtual void bind(); - virtual void unbind(); - virtual void update (double delta_time_sec); + // Subsystem API. + void bind() override; + InitStatus incrementalInit() override; + void init() override; + void postinit() override; + void reinit() override; + void unbind() override; + void update(double delta_time_sec) override; private: inline string areaSubsystemName( unsigned i ) { diff --git a/src/FDM/ExternalNet/ExternalNet.hxx b/src/FDM/ExternalNet/ExternalNet.hxx index c5f3cf83d..066443c85 100644 --- a/src/FDM/ExternalNet/ExternalNet.hxx +++ b/src/FDM/ExternalNet/ExternalNet.hxx @@ -54,11 +54,9 @@ public: // Destructor ~FGExternalNet(); - // Reset flight params to a specific position - void init(); - - // update the fdm - void update( double dt ); + // Subsystem API. + void init() override; + void update(double dt) override; }; #endif // _EXTERNAL_NET_HXX diff --git a/src/FDM/ExternalPipe/ExternalPipe.hxx b/src/FDM/ExternalPipe/ExternalPipe.hxx index 934ed07f6..7ca5a2366 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.hxx +++ b/src/FDM/ExternalPipe/ExternalPipe.hxx @@ -70,11 +70,9 @@ public: // Destructor ~FGExternalPipe(); - // Reset flight params to a specific position - void init(); - - // update the fdm - void update( double dt ); + // Subsystem API. + void init() override; + void update(double dt) override; }; #endif // _EXTERNAL_PIPE_HXX diff --git a/src/FDM/JSBSim/JSBSim.hxx b/src/FDM/JSBSim/JSBSim.hxx index cb6ddb084..aac75222c 100644 --- a/src/FDM/JSBSim/JSBSim.hxx +++ b/src/FDM/JSBSim/JSBSim.hxx @@ -107,24 +107,19 @@ public: /// Destructor ~FGJSBsim(); + // Subsystem API. + void init() override; + void resume() override; + void suspend() override; + void unbind() override; + void update(double dt) override; + /// copy FDM state to LaRCsim structures bool copy_to_JSBsim(); /// copy FDM state from LaRCsim structures bool copy_from_JSBsim(); - /// Reset flight params to a specific position - void init(); - - /// Unbind properties - void unbind(); - - /// Suspend integration - void suspend(); - - /// Resume integration - void resume(); - /// @name Position Parameter Set //@{ /** Set geocentric latitude @@ -211,11 +206,6 @@ public: /// @name Position Parameter Update //@{ - - /** Update the position based on inputs, positions, velocities, etc. - @param dt delta time in seconds. */ - void update(double dt); - bool ToggleDataLogging(bool state); bool ToggleDataLogging(void); diff --git a/src/FDM/LaRCsim/LaRCsim.hxx b/src/FDM/LaRCsim/LaRCsim.hxx index b4708f860..01f2fe81c 100644 --- a/src/FDM/LaRCsim/LaRCsim.hxx +++ b/src/FDM/LaRCsim/LaRCsim.hxx @@ -48,18 +48,16 @@ public: FGLaRCsim( double dt ); ~FGLaRCsim(void); + // Subsystem API. + void init() override; + void update(double dt) override; + // copy FDM state to LaRCsim structures bool copy_to_LaRCsim(); // copy FDM state from LaRCsim structures bool copy_from_LaRCsim(); - // reset flight params to a specific position - void init(); - - // update position based on inputs, positions, velocities, etc. - void update( double dt ); - // Positions void set_Latitude(double lat); //geocentric void set_Longitude(double lon); diff --git a/src/FDM/NullFDM.hxx b/src/FDM/NullFDM.hxx index c966e2e7c..700cf5b2e 100644 --- a/src/FDM/NullFDM.hxx +++ b/src/FDM/NullFDM.hxx @@ -35,11 +35,9 @@ public: FGNullFDM( double dt ); ~FGNullFDM(); - // reset flight params to a specific position - void init(); - - // update position based on inputs, positions, velocities, etc. - void update( double dt ); + // Subsystem API. + void init() override; + void update(double dt) override; }; #endif // _NULLFDM_HXX diff --git a/src/FDM/SP/ACMS.hxx b/src/FDM/SP/ACMS.hxx index 23d43c178..566014324 100644 --- a/src/FDM/SP/ACMS.hxx +++ b/src/FDM/SP/ACMS.hxx @@ -34,11 +34,9 @@ public: FGACMS( double dt ); ~FGACMS(); - // reset flight params to a specific position - void init(); - - // update position based on properties - void update( double dt ); + // Subsystem API. + void init() override; + void update(double dt) override; private: SGPropertyNode_ptr _alt, _speed, _climb_rate; diff --git a/src/FDM/SP/ADA.hxx b/src/FDM/SP/ADA.hxx index a87a1094f..061f607e1 100644 --- a/src/FDM/SP/ADA.hxx +++ b/src/FDM/SP/ADA.hxx @@ -73,11 +73,9 @@ public: FGADA( double dt ); ~FGADA(); - // reset flight params to a specific position - void init(); - - // update position based on inputs, positions, velocities, etc. - void update(double dt); + // Subsystem API. + void init() override; + void update(double dt) override; }; #endif // _ADA_HXX diff --git a/src/FDM/SP/AISim.hpp b/src/FDM/SP/AISim.hpp index 168ea85b3..1636c53bf 100644 --- a/src/FDM/SP/AISim.hpp +++ b/src/FDM/SP/AISim.hpp @@ -75,11 +75,9 @@ public: FGAISim(double dt); ~FGAISim(); - // reset flight params to a specific location - void init(); - - // update location based on properties - void update(double dt); + // Subsystem API. + void init() override; + void update(double dt) override; bool load(std::string path); diff --git a/src/FDM/SP/Balloon.h b/src/FDM/SP/Balloon.h index ecac4bd57..42a07caa5 100644 --- a/src/FDM/SP/Balloon.h +++ b/src/FDM/SP/Balloon.h @@ -63,17 +63,15 @@ public: FGBalloonSim( double dt ); ~FGBalloonSim(); + // Subsystem API. + void init() override; + void update(double dt) override; + // copy FDM state to BalloonSim structures bool copy_to_BalloonSim(); // copy FDM state from BalloonSim structures bool copy_from_BalloonSim(); - - // reset flight params to a specific position - void init(); - - // update position based on inputs, positions, velocities, etc. - void update( double dt ); }; /****************************************************************************/ diff --git a/src/FDM/SP/MagicCarpet.hxx b/src/FDM/SP/MagicCarpet.hxx index 5b09a57f6..92ea7d23d 100644 --- a/src/FDM/SP/MagicCarpet.hxx +++ b/src/FDM/SP/MagicCarpet.hxx @@ -34,11 +34,9 @@ public: FGMagicCarpet( double dt ); ~FGMagicCarpet(); - // reset flight params to a specific position - void init(); - - // update position based on inputs, positions, velocities, etc. - void update( double dt ); + // Subsystem API. + void init() override; + void update(double dt) override; }; #endif // _MAGICCARPET_HXX diff --git a/src/FDM/UFO.hxx b/src/FDM/UFO.hxx index dd9569eb8..d1e08d807 100644 --- a/src/FDM/UFO.hxx +++ b/src/FDM/UFO.hxx @@ -64,11 +64,9 @@ public: FGUFO( double dt ); ~FGUFO(); - // reset flight params to a specific position - void init(); - - // update position based on inputs, positions, velocities, etc. - void update( double dt ); + // Subsystem API. + void init() override; + void update(double dt) override; }; #endif // _UFO_HXX diff --git a/src/FDM/YASim/YASim.hxx b/src/FDM/YASim/YASim.hxx index a41aabbc9..2f23a1638 100644 --- a/src/FDM/YASim/YASim.hxx +++ b/src/FDM/YASim/YASim.hxx @@ -12,13 +12,11 @@ public: YASim(double dt); ~YASim(); - // Load externally set stuff into the FDM - virtual void init(); - virtual void bind(); - virtual void reinit(); - - // Run an iteration - virtual void update(double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void update(double dt) override; private: void report(); diff --git a/src/FDM/fdm_shell.hxx b/src/FDM/fdm_shell.hxx index 74d120296..8753f95de 100644 --- a/src/FDM/fdm_shell.hxx +++ b/src/FDM/fdm_shell.hxx @@ -44,20 +44,20 @@ public: FDMShell(); ~FDMShell() override; - void init() override; - void shutdown() override; - void reinit() override; - void postinit() override; - + // Subsystem API. void bind() override; + void init() override; + void postinit() override; + void reinit() override; + void shutdown() override; void unbind() override; - void update(double dt) override; - FGInterface* getInterface() const; - + // Subsystem identification. static const char* subsystemName() { return "flight"; } + FGInterface* getInterface() const; + private: void createImplementation(); diff --git a/src/FDM/flight.hxx b/src/FDM/flight.hxx index 7f45207a0..83fb11f75 100644 --- a/src/FDM/flight.hxx +++ b/src/FDM/flight.hxx @@ -390,10 +390,12 @@ public: FGInterface( double dt ); virtual ~FGInterface(); - virtual void init (); - virtual void bind (); - virtual void unbind (); - virtual void update(double dt); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; + virtual bool ToggleDataLogging(bool state) { return false; } virtual bool ToggleDataLogging(void) { return false; } diff --git a/src/GUI/new_gui.hxx b/src/GUI/new_gui.hxx index d98db1407..d49102478 100644 --- a/src/GUI/new_gui.hxx +++ b/src/GUI/new_gui.hxx @@ -40,38 +40,16 @@ public: */ virtual ~NewGUI (); - /** - * Initialize the GUI subsystem. - */ - virtual void init (); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void shutdown() override; + void unbind() override; + void update(double delta_time_sec) override; - virtual void shutdown (); - - /** - * Reinitialize the GUI subsystem. Reloads all XML dialogs. - */ - virtual void reinit (); - - /** - * Bind properties for the GUI subsystem. - * - * Currently, this method binds the properties for showing and - * hiding the menu. - */ - virtual void bind (); - - /** - * Unbind properties for the GUI subsystem. - */ - virtual void unbind (); - - /** - * Update the GUI subsystem. - * - * Currently, this method is a no-op, because nothing the GUI - * subsystem does is time-dependent. - */ - virtual void update (double delta_time_sec); + // Subsystem identification. + static const char* subsystemName() { return "gui"; } /** * Redraw the GUI picking up new GUI colors. @@ -170,8 +148,6 @@ public: virtual puFont *getDefaultFont() { return _font; } - static const char* subsystemName() { return "gui"; } - protected: /** * Test if the menubar is visible. diff --git a/src/Input/FGEventInput.hxx b/src/Input/FGEventInput.hxx index 05f3954e9..11c66150e 100644 --- a/src/Input/FGEventInput.hxx +++ b/src/Input/FGEventInput.hxx @@ -322,10 +322,12 @@ class FGEventInput : public SGSubsystem, public: FGEventInput(); virtual ~FGEventInput(); + + // Subsystem API. void init() override; void postinit() override; - void update( double dt ) override; void shutdown() override; + void update(double dt) override; const static unsigned MAX_DEVICES = 1000; const static unsigned INVALID_DEVICE_INDEX = MAX_DEVICES + 1; diff --git a/src/Input/FGHIDEventInput.hxx b/src/Input/FGHIDEventInput.hxx index 764283629..4b1e05c45 100644 --- a/src/Input/FGHIDEventInput.hxx +++ b/src/Input/FGHIDEventInput.hxx @@ -39,12 +39,14 @@ public: virtual ~FGHIDEventInput(); - void update(double dt) override; + // Subsystem API. void init() override; + void postinit() override; void reinit() override; - void postinit(); void shutdown() override; + void update(double dt) override; + // Subsystem identification. static const char* subsystemName() { return "input-hid"; } private: diff --git a/src/Input/FGJoystickInput.hxx b/src/Input/FGJoystickInput.hxx index 862295a0b..aa1ce1090 100644 --- a/src/Input/FGJoystickInput.hxx +++ b/src/Input/FGJoystickInput.hxx @@ -43,10 +43,11 @@ public: FGJoystickInput(); virtual ~FGJoystickInput(); - virtual void init(); - virtual void postinit(); - virtual void reinit(); - virtual void update( double dt ); + // Subsystem API. + void init() override; + void postinit() override; + void reinit() override; + void update(double dt) override; static const int MAX_JOYSTICKS = 16; static const int MAX_JOYSTICK_AXES = _JS_MAX_AXES; diff --git a/src/Input/FGKeyboardInput.hxx b/src/Input/FGKeyboardInput.hxx index 35ba39277..fa93ab077 100644 --- a/src/Input/FGKeyboardInput.hxx +++ b/src/Input/FGKeyboardInput.hxx @@ -44,11 +44,12 @@ public: FGKeyboardInput(); virtual ~FGKeyboardInput(); - virtual void init(); - virtual void postinit(); - virtual void bind(); - virtual void unbind(); - virtual void update( double dt ); + // Subsystem API. + void bind() override; + void init() override; + void postinit() override; + void unbind() override; + void update(double dt) override; static const int MAX_KEYS = 1024; diff --git a/src/Input/FGLinuxEventInput.hxx b/src/Input/FGLinuxEventInput.hxx index 49cf5a0c6..db6696ca4 100644 --- a/src/Input/FGLinuxEventInput.hxx +++ b/src/Input/FGLinuxEventInput.hxx @@ -70,8 +70,10 @@ class FGLinuxEventInput : public FGEventInput public: FGLinuxEventInput(); virtual ~ FGLinuxEventInput(); - virtual void update (double dt); - virtual void postinit(); + + // Subsystem API. + void postinit() override; + void update(double dt) override; protected: }; diff --git a/src/Input/FGMacOSXEventInput.hxx b/src/Input/FGMacOSXEventInput.hxx index ff0d3287b..c6432e2d6 100644 --- a/src/Input/FGMacOSXEventInput.hxx +++ b/src/Input/FGMacOSXEventInput.hxx @@ -48,10 +48,12 @@ public: FGMacOSXEventInput(); virtual ~FGMacOSXEventInput(); - virtual void update(double dt); - virtual void init(); - virtual void postinit(); - virtual void shutdown(); + + // Subsystem API. + void init() override; + void postinit() override; + void shutdown() override; + void update(double dt) override; private: friend class FGMacOSXEventInputPrivate; diff --git a/src/Input/FGMouseInput.hxx b/src/Input/FGMouseInput.hxx index a6c3cee42..87f41b35d 100644 --- a/src/Input/FGMouseInput.hxx +++ b/src/Input/FGMouseInput.hxx @@ -45,11 +45,13 @@ public: FGMouseInput(); virtual ~FGMouseInput() = default; + // Subsystem API. void init() override; - void shutdown() override; void reinit() override; - void update( double dt ) override; + void shutdown() override; + void update(double dt) override; + // Subsystem identification. static const char* subsystemName() { return "input-mouse"; } void doMouseClick (int b, int updown, int x, int y, bool mainWindow, const osgGA::GUIEventAdapter* ea); diff --git a/src/Input/input.hxx b/src/Input/input.hxx index e31ab9f4c..1fd9fbe6b 100644 --- a/src/Input/input.hxx +++ b/src/Input/input.hxx @@ -55,6 +55,7 @@ public: */ virtual ~FGInput(); + // Subsystem identification. static const char* subsystemName() { return "input"; } }; diff --git a/src/Instrumentation/HUD/HUD.hxx b/src/Instrumentation/HUD/HUD.hxx index 29fefbc5d..81368587b 100644 --- a/src/Instrumentation/HUD/HUD.hxx +++ b/src/Instrumentation/HUD/HUD.hxx @@ -121,10 +121,11 @@ class HUD : public SGSubsystem, public: HUD(); ~HUD(); - void init(); - void update(double); - void reinit(); + // Subsystem API. + void init() override; + void reinit() override; + void update(double) override; // called from Main/renderer.cxx to draw 2D and 3D HUD void draw(osg::State&); diff --git a/src/Instrumentation/KLN89/kln89.hxx b/src/Instrumentation/KLN89/kln89.hxx index b55f91aeb..00468d5e4 100644 --- a/src/Instrumentation/KLN89/kln89.hxx +++ b/src/Instrumentation/KLN89/kln89.hxx @@ -96,10 +96,11 @@ public: KLN89(RenderArea2D* instrument); ~KLN89(); - void bind(); - void unbind(); - void init(); - void update(double dt); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; // Set Units // m if true, ft if false diff --git a/src/Instrumentation/adf.hxx b/src/Instrumentation/adf.hxx index 6877d82d9..01ddb0775 100644 --- a/src/Instrumentation/adf.hxx +++ b/src/Instrumentation/adf.hxx @@ -43,8 +43,9 @@ public: ADF ( SGPropertyNode *node ); virtual ~ADF (); - virtual void init (); - virtual void update (double delta_time_sec); + // Subsystem API. + void init() override; + void update(double delta_time_sec) override; private: void set_bearing (double delta_time_sec, double bearing); diff --git a/src/Instrumentation/airspeed_indicator.hxx b/src/Instrumentation/airspeed_indicator.hxx index 91aa26664..f8b0a135b 100644 --- a/src/Instrumentation/airspeed_indicator.hxx +++ b/src/Instrumentation/airspeed_indicator.hxx @@ -40,9 +40,10 @@ public: AirspeedIndicator ( SGPropertyNode *node ); virtual ~AirspeedIndicator (); - virtual void init (); - virtual void reinit (); - virtual void update (double dt); + // Subsystem API. + void init() override; + void reinit() override; + void update(double dt) override; private: void computeMach(); diff --git a/src/Instrumentation/altimeter.hxx b/src/Instrumentation/altimeter.hxx index d8da96a6c..26278fda4 100644 --- a/src/Instrumentation/altimeter.hxx +++ b/src/Instrumentation/altimeter.hxx @@ -33,11 +33,12 @@ public: Altimeter (SGPropertyNode *node, const std::string& aDefaultName, double quantum = 0); virtual ~Altimeter (); - virtual void init (); - virtual void reinit (); - virtual void update (double dt); - virtual void bind(); - virtual void unbind(); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; double getSettingInHg() const; void setSettingInHg( double value ); diff --git a/src/Instrumentation/attitude_indicator.hxx b/src/Instrumentation/attitude_indicator.hxx index f75cc6a07..0ca4a9e69 100644 --- a/src/Instrumentation/attitude_indicator.hxx +++ b/src/Instrumentation/attitude_indicator.hxx @@ -42,11 +42,12 @@ public: AttitudeIndicator ( SGPropertyNode *node ); virtual ~AttitudeIndicator (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: std::string _name; diff --git a/src/Instrumentation/clock.hxx b/src/Instrumentation/clock.hxx index 88567ff00..2c986fecf 100644 --- a/src/Instrumentation/clock.hxx +++ b/src/Instrumentation/clock.hxx @@ -32,8 +32,9 @@ public: Clock(SGPropertyNode *node); virtual ~Clock(); - virtual void init(); - virtual void update(double dt); + // Subsystem API. + void init() override; + void update(double dt) override; private: std::string _name; diff --git a/src/Instrumentation/commradio.cxx b/src/Instrumentation/commradio.cxx index b7f2dd33c..56e3a959b 100644 --- a/src/Instrumentation/commradio.cxx +++ b/src/Instrumentation/commradio.cxx @@ -461,10 +461,11 @@ public: CommRadioImpl(SGPropertyNode_ptr node); virtual ~CommRadioImpl(); - void update(double dt) override; - void init() override; + // Subsystem API. void bind() override; + void init() override; void unbind() override; + void update(double dt) override; private: bool _useEightPointThree = false; diff --git a/src/Instrumentation/dclgps.hxx b/src/Instrumentation/dclgps.hxx index f0c72873d..05795606b 100644 --- a/src/Instrumentation/dclgps.hxx +++ b/src/Instrumentation/dclgps.hxx @@ -202,12 +202,13 @@ public: DCLGPS(RenderArea2D* instrument); virtual ~DCLGPS() = 0; - virtual void draw(osg::State& state); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; - virtual void init(); - virtual void bind(); - virtual void unbind(); - virtual void update(double dt); + virtual void draw(osg::State& state); // Expand a SIAP ident to the full procedure name. std::string ExpandSIAPIdent(const std::string& ident); diff --git a/src/Instrumentation/dme.hxx b/src/Instrumentation/dme.hxx index 252a8232a..5f6d76153 100644 --- a/src/Instrumentation/dme.hxx +++ b/src/Instrumentation/dme.hxx @@ -38,6 +38,7 @@ public: DME ( SGPropertyNode *node ); virtual ~DME (); + // Subsystem API. void init() override; void reinit() override; void update(double delta_time_sec) override; diff --git a/src/Instrumentation/gps.hxx b/src/Instrumentation/gps.hxx index 2e174cb78..97b522531 100644 --- a/src/Instrumentation/gps.hxx +++ b/src/Instrumentation/gps.hxx @@ -64,13 +64,12 @@ public: GPS (); virtual ~GPS (); - // SGSubsystem interface - virtual void init (); - virtual void reinit (); - virtual void update (double delta_time_sec); - - virtual void bind(); - virtual void unbind(); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double delta_time_sec) override; // RNAV interface virtual SGGeod position(); diff --git a/src/Instrumentation/gsdi.hxx b/src/Instrumentation/gsdi.hxx index fa769be41..15c1019b4 100644 --- a/src/Instrumentation/gsdi.hxx +++ b/src/Instrumentation/gsdi.hxx @@ -47,8 +47,9 @@ public: GSDI(SGPropertyNode *node); virtual ~GSDI(); - virtual void init(); - virtual void update(double dt); + // Subsystem API. + void init() override; + void update(double dt) override; private: std::string _name; diff --git a/src/Instrumentation/heading_indicator.hxx b/src/Instrumentation/heading_indicator.hxx index 2f5bfec6b..54d9bb55c 100644 --- a/src/Instrumentation/heading_indicator.hxx +++ b/src/Instrumentation/heading_indicator.hxx @@ -39,11 +39,12 @@ public: HeadingIndicator (); virtual ~HeadingIndicator (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: Gyro _gyro; diff --git a/src/Instrumentation/heading_indicator_dg.hxx b/src/Instrumentation/heading_indicator_dg.hxx index bbb9d13fc..1047d90a1 100644 --- a/src/Instrumentation/heading_indicator_dg.hxx +++ b/src/Instrumentation/heading_indicator_dg.hxx @@ -37,11 +37,12 @@ public: HeadingIndicatorDG (); virtual ~HeadingIndicatorDG (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: Gyro _gyro; diff --git a/src/Instrumentation/heading_indicator_fg.hxx b/src/Instrumentation/heading_indicator_fg.hxx index 62efe7bf6..a3dad5955 100644 --- a/src/Instrumentation/heading_indicator_fg.hxx +++ b/src/Instrumentation/heading_indicator_fg.hxx @@ -39,11 +39,12 @@ public: HeadingIndicatorFG (); virtual ~HeadingIndicatorFG (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: Gyro _gyro; diff --git a/src/Instrumentation/inst_vertical_speed_indicator.hxx b/src/Instrumentation/inst_vertical_speed_indicator.hxx index 2782550c4..2762f897e 100644 --- a/src/Instrumentation/inst_vertical_speed_indicator.hxx +++ b/src/Instrumentation/inst_vertical_speed_indicator.hxx @@ -54,9 +54,10 @@ public: InstVerticalSpeedIndicator ( SGPropertyNode *node ); virtual ~InstVerticalSpeedIndicator (); - virtual void init (); - virtual void reinit (); - virtual void update (double dt); + // Subsystem API. + void init() override; + void reinit() override; + void update(double dt) override; private: std::string _name; diff --git a/src/Instrumentation/instrument_mgr.hxx b/src/Instrumentation/instrument_mgr.hxx index dcd30d88f..ec42e43f9 100644 --- a/src/Instrumentation/instrument_mgr.hxx +++ b/src/Instrumentation/instrument_mgr.hxx @@ -31,8 +31,9 @@ public: FGInstrumentMgr (); virtual ~FGInstrumentMgr (); - virtual void init(); - virtual InitStatus incrementalInit(); + // Subsystem API. + void init() override; + InitStatus incrementalInit() override; private: bool build (SGPropertyNode* config_props); diff --git a/src/Instrumentation/kr_87.hxx b/src/Instrumentation/kr_87.hxx index 46ff924f1..2dee3d941 100644 --- a/src/Instrumentation/kr_87.hxx +++ b/src/Instrumentation/kr_87.hxx @@ -108,11 +108,12 @@ public: FGKR_87( SGPropertyNode *node ); ~FGKR_87(); - void init (); - void reinit (); - void bind (); - void unbind (); - void update (double dt_sec); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt_sec) override; // Update nav/adf radios based on current postition void search (); diff --git a/src/Instrumentation/mag_compass.hxx b/src/Instrumentation/mag_compass.hxx index 3e9106896..f5d06edc7 100644 --- a/src/Instrumentation/mag_compass.hxx +++ b/src/Instrumentation/mag_compass.hxx @@ -45,9 +45,10 @@ public: MagCompass (); virtual ~MagCompass (); - virtual void init (); - virtual void reinit (); - virtual void update (double dt); + // Subsystem API. + void init() override; + void reinit() override; + void update(double dt) override; private: double _rate_degps; diff --git a/src/Instrumentation/marker_beacon.hxx b/src/Instrumentation/marker_beacon.hxx index 6b18c8e6f..d52d06b2e 100644 --- a/src/Instrumentation/marker_beacon.hxx +++ b/src/Instrumentation/marker_beacon.hxx @@ -66,11 +66,12 @@ public: FGMarkerBeacon(SGPropertyNode *node); ~FGMarkerBeacon(); - void init () override; - void reinit () override; - void bind () override; - void unbind () override; - void update (double dt) override; + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; void search (); diff --git a/src/Instrumentation/mk_viii.hxx b/src/Instrumentation/mk_viii.hxx index aeea823cb..35b7d9ada 100644 --- a/src/Instrumentation/mk_viii.hxx +++ b/src/Instrumentation/mk_viii.hxx @@ -1374,10 +1374,11 @@ class MK_VIII : public SGSubsystem public: MK_VIII (SGPropertyNode *node); - virtual void init (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; }; #ifdef _MSC_VER diff --git a/src/Instrumentation/mrg.hxx b/src/Instrumentation/mrg.hxx index 9a3fc6e93..6e517a75f 100644 --- a/src/Instrumentation/mrg.hxx +++ b/src/Instrumentation/mrg.hxx @@ -40,11 +40,12 @@ public: MasterReferenceGyro (); virtual ~MasterReferenceGyro (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: static const double gravity; //conversion factor diff --git a/src/Instrumentation/navradio.hxx b/src/Instrumentation/navradio.hxx index cdaad8f12..bebbed7c0 100644 --- a/src/Instrumentation/navradio.hxx +++ b/src/Instrumentation/navradio.hxx @@ -173,9 +173,10 @@ public: FGNavRadio(SGPropertyNode *node); ~FGNavRadio(); - void init (); - void reinit (); - void update (double dt); + // Subsystem API. + void init() override; + void reinit() override; + void update(double dt) override; // Update nav/adf radios based on current postition void search (); diff --git a/src/Instrumentation/newnavradio.cxx b/src/Instrumentation/newnavradio.cxx index 112ad887d..767878aee 100644 --- a/src/Instrumentation/newnavradio.cxx +++ b/src/Instrumentation/newnavradio.cxx @@ -808,8 +808,9 @@ public: NavRadioImpl( SGPropertyNode_ptr node ); virtual ~NavRadioImpl(); - virtual void update( double dt ); - virtual void init(); + // Subsystem API. + void init() override; + void update(double dt) override; private: void search(); diff --git a/src/Instrumentation/rad_alt.hxx b/src/Instrumentation/rad_alt.hxx index 4e18f1506..754857af9 100644 --- a/src/Instrumentation/rad_alt.hxx +++ b/src/Instrumentation/rad_alt.hxx @@ -34,10 +34,11 @@ public: RadarAltimeter ( SGPropertyNode *node ); virtual ~RadarAltimeter (); -private: - virtual void init (); - virtual void update (double dt); + // Subsystem API. + void init() override; + void update(double dt) override; +private: void update_altitude(); void updateSetHeight(); diff --git a/src/Instrumentation/slip_skid_ball.hxx b/src/Instrumentation/slip_skid_ball.hxx index e0ad396b0..6d808dca5 100644 --- a/src/Instrumentation/slip_skid_ball.hxx +++ b/src/Instrumentation/slip_skid_ball.hxx @@ -34,9 +34,10 @@ public: SlipSkidBall ( SGPropertyNode *node ); virtual ~SlipSkidBall (); - virtual void init (); - virtual void reinit (); - virtual void update (double dt); + // Subsystem API. + void init() override; + void reinit() override; + void update(double dt) override; private: std::string _name; diff --git a/src/Instrumentation/tacan.hxx b/src/Instrumentation/tacan.hxx index 680d2bae9..4763d8449 100644 --- a/src/Instrumentation/tacan.hxx +++ b/src/Instrumentation/tacan.hxx @@ -38,9 +38,10 @@ public: TACAN(SGPropertyNode *node); virtual ~TACAN(); - virtual void init (); - virtual void reinit (); - virtual void update (double delta_time_sec); + // Subsystem API. + void init() override; + void reinit() override; + void update(double delta_time_sec) override; private: void disabled(bool force = false); diff --git a/src/Instrumentation/tcas.hxx b/src/Instrumentation/tcas.hxx index aaf1327bb..6d768862d 100644 --- a/src/Instrumentation/tcas.hxx +++ b/src/Instrumentation/tcas.hxx @@ -381,13 +381,13 @@ private: public: TCAS (SGPropertyNode* node); - virtual void bind (void); - virtual void unbind (void); - virtual void init (void); - virtual void reinit (void); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; - /* configuration options */ int _verticalRange; int _lateralRange; diff --git a/src/Instrumentation/transponder.hxx b/src/Instrumentation/transponder.hxx index 317b5745d..4a81fb0aa 100644 --- a/src/Instrumentation/transponder.hxx +++ b/src/Instrumentation/transponder.hxx @@ -34,10 +34,11 @@ public: Transponder(SGPropertyNode *node); virtual ~Transponder(); - void init () override; - void update (double dt) override; + // Subsystem API. void bind() override; + void init() override; void unbind() override; + void update(double dt) override; protected: bool isPowerSwitchOn() const override; diff --git a/src/Instrumentation/turn_indicator.hxx b/src/Instrumentation/turn_indicator.hxx index ac85243a3..15399e474 100644 --- a/src/Instrumentation/turn_indicator.hxx +++ b/src/Instrumentation/turn_indicator.hxx @@ -41,11 +41,12 @@ public: TurnIndicator ( SGPropertyNode *node ); virtual ~TurnIndicator (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: Gyro _gyro; diff --git a/src/Instrumentation/vertical_speed_indicator.hxx b/src/Instrumentation/vertical_speed_indicator.hxx index 103806e0b..9387b2021 100644 --- a/src/Instrumentation/vertical_speed_indicator.hxx +++ b/src/Instrumentation/vertical_speed_indicator.hxx @@ -37,9 +37,10 @@ public: VerticalSpeedIndicator ( SGPropertyNode *node ); virtual ~VerticalSpeedIndicator (); - virtual void init (); - virtual void reinit (); - virtual void update (double dt); + // Subsystem API. + void init() override; + void reinit() override; + void update(double dt) override; private: double _casing_pressure_Pa = 0.0; diff --git a/src/Main/fg_io.hxx b/src/Main/fg_io.hxx index a45af25b9..61c957d18 100644 --- a/src/Main/fg_io.hxx +++ b/src/Main/fg_io.hxx @@ -40,13 +40,13 @@ public: FGIO(); ~FGIO(); - void init(); - void reinit(); - void bind(); - void unbind(); - void update( double dt ); - - void shutdown(); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; /** * helper to determine early in startup, if MP will be used. diff --git a/src/Main/fg_props.hxx b/src/Main/fg_props.hxx index d0c6f367f..7b910485d 100644 --- a/src/Main/fg_props.hxx +++ b/src/Main/fg_props.hxx @@ -23,10 +23,11 @@ public: FGProperties (); virtual ~FGProperties (); - void init (); - void bind (); - void unbind (); - void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; private: simgear::TiedPropertyList _tiedProperties; diff --git a/src/Main/logger.hxx b/src/Main/logger.hxx index 51d59ac18..13498aae4 100644 --- a/src/Main/logger.hxx +++ b/src/Main/logger.hxx @@ -20,12 +20,12 @@ class FGLogger : public SGSubsystem { public: - // Implementation of SGSubsystem - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: /** diff --git a/src/Model/acmodel.hxx b/src/Model/acmodel.hxx index 628953fca..66ed0b54c 100644 --- a/src/Model/acmodel.hxx +++ b/src/Model/acmodel.hxx @@ -24,17 +24,20 @@ public: FGAircraftModel (); virtual ~FGAircraftModel (); - virtual void init (); - virtual void shutdown (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "aircraft-model"; } + virtual SGModelPlacement * get3DModel() { return _aircraft.get(); } virtual SGVec3d& getVelocity() { return _velocity; } - static const char* subsystemName() { return "aircraft-model"; } - private: void deinit (); diff --git a/src/Model/modelmgr.hxx b/src/Model/modelmgr.hxx index 6fb2cb0cc..f3dbfd467 100644 --- a/src/Model/modelmgr.hxx +++ b/src/Model/modelmgr.hxx @@ -54,12 +54,15 @@ public: FGModelMgr (); virtual ~FGModelMgr (); - virtual void init (); - virtual void shutdown (); + // Subsystem API. + void bind() override; + void init() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem identification. + static const char* subsystemName() { return "model-manager"; } virtual void add_model (SGPropertyNode * node); @@ -83,8 +86,6 @@ public: */ virtual void remove_instance (Instance * instance); - static const char* subsystemName() { return "model-manager"; } - private: /** * Listener class that adds models at runtime. diff --git a/src/MultiPlayer/multiplaymgr.hxx b/src/MultiPlayer/multiplaymgr.hxx index e8fa8e72e..a0c004b13 100644 --- a/src/MultiPlayer/multiplaymgr.hxx +++ b/src/MultiPlayer/multiplaymgr.hxx @@ -54,11 +54,11 @@ public: FGMultiplayMgr(); ~FGMultiplayMgr(); - virtual void init(void); - virtual void update(double dt); - - virtual void shutdown(void); - virtual void reinit(); + // Subsystem API. + void init() override; + void reinit() override; + void shutdown() override; + void update(double dt) override; // transmitter diff --git a/src/Network/DNSClient.hxx b/src/Network/DNSClient.hxx index 2366e19e8..875783676 100644 --- a/src/Network/DNSClient.hxx +++ b/src/Network/DNSClient.hxx @@ -31,18 +31,20 @@ public: FGDNSClient(); virtual ~FGDNSClient(); + // Subsystem API. + void init() override; + void postinit() override; + void shutdown() override; + void update(double) override; + + // Subsystem identification. + static const char* subsystemName() { return "dns"; } + void makeRequest(const simgear::DNS::Request_ptr& req); // simgear::HTTP::Client* client() { return _http.get(); } // simgear::HTTP::Client const* client() const { return _http.get(); } - virtual void init(); - virtual void postinit(); - virtual void shutdown(); - virtual void update(double); - - static const char* subsystemName() { return "dns"; } - private: bool _inited; std::unique_ptr _dns; diff --git a/src/Network/HTTPClient.hxx b/src/Network/HTTPClient.hxx index 70de53934..2bb166c6a 100644 --- a/src/Network/HTTPClient.hxx +++ b/src/Network/HTTPClient.hxx @@ -31,16 +31,20 @@ public: FGHTTPClient(); virtual ~FGHTTPClient(); + // Subsystem API. + void init() override; + void postinit() override; + void shutdown() override; + void update(double) override; + + // Subsystem identification. + static const char* subsystemName() { return "http"; } + void makeRequest(const simgear::HTTP::Request_ptr& req); simgear::HTTP::Client* client() { return _http.get(); } simgear::HTTP::Client const* client() const { return _http.get(); } - virtual void init(); - virtual void postinit(); - virtual void shutdown(); - virtual void update(double); - bool isDefaultCatalogInstalled() const; void addDefaultCatalog(); @@ -48,8 +52,6 @@ public: std::string getDefaultCatalogUrl() const; std::string getDefaultCatalogFallbackUrl() const; - static const char* subsystemName() { return "http"; } - private: bool _inited; std::unique_ptr _http; diff --git a/src/Network/Swift/swift_connection.hxx b/src/Network/Swift/swift_connection.hxx index 0220276a6..28f689446 100644 --- a/src/Network/Swift/swift_connection.hxx +++ b/src/Network/Swift/swift_connection.hxx @@ -38,20 +38,22 @@ class SwiftConnection : public SGSubsystem { public: - bool startServer(const SGPropertyNode* arg, SGPropertyNode* root); - bool stopServer(const SGPropertyNode* arg, SGPropertyNode* root); SwiftConnection(); ~SwiftConnection(); - FGSwiftBus::CPlugin* plug; - virtual void init(void); - virtual void update(double delta_time_sec) override; - virtual void shutdown(void); - virtual void reinit(); + // Subsystem API. + void init() override; + void reinit() override; + void shutdown() override; + void update(double delta_time_sec) override; + + bool startServer(const SGPropertyNode* arg, SGPropertyNode* root); + bool stopServer(const SGPropertyNode* arg, SGPropertyNode* root); + FGSwiftBus::CPlugin* plug; private: bool serverRunning = false; bool initialized = false; }; -#endif \ No newline at end of file +#endif diff --git a/src/Network/fgcom.hxx b/src/Network/fgcom.hxx index fcb115522..86e44fedd 100644 --- a/src/Network/fgcom.hxx +++ b/src/Network/fgcom.hxx @@ -30,13 +30,15 @@ public: FGCom(); virtual ~FGCom(); - virtual void bind(); - virtual void unbind(); - virtual void init(); - virtual void postinit(); - virtual void update(double dt); + // Subsystem API. + void bind() override; + void init() override; + void postinit() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; + virtual void valueChanged(SGPropertyNode *prop); - virtual void shutdown(); void iaxTextEvent(struct iaxc_ev_text text); private: diff --git a/src/Network/http/httpd.cxx b/src/Network/http/httpd.cxx index 661809b11..72e2bd4c9 100644 --- a/src/Network/http/httpd.cxx +++ b/src/Network/http/httpd.cxx @@ -179,31 +179,11 @@ public: */ ~MongooseHttpd(); - /** - * override SGSubsystem::init() - * - * Reads the configuration PropertyNode, installs URIHandlers and configures mongoose - */ - void init(); - - /** - * override SGSubsystem::bind() - * - * Currently a noop - */ - void bind(); - - /** - * override SGSubsystem::unbind() - * shutdown of mongoose, clear connections, unregister URIHandlers - */ - void unbind(); - - /** - * overrride SGSubsystem::update() - * poll connections, check for changed properties - */ - void update(double dt); + // Subsystem API. + void bind() override; // Currently a noop + void init() override; // Reads the configuration PropertyNode, installs URIHandlers and configures mongoose + void unbind() override; // shutdown of mongoose, clear connections, unregister URIHandlers + void update(double dt) override; // poll connections, check for changed properties /** * Returns a URIHandler for the given uri diff --git a/src/Scenery/scenery.hxx b/src/Scenery/scenery.hxx index 28304bfa3..4262a4a54 100644 --- a/src/Scenery/scenery.hxx +++ b/src/Scenery/scenery.hxx @@ -71,13 +71,16 @@ public: FGScenery(); ~FGScenery(); - // Implementation of SGSubsystem. - void init (); - void reinit(); - void shutdown (); - void bind (); - void unbind (); - void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "scenery"; } /// Compute the elevation of the scenery at geodetic latitude lat, /// geodetic longitude lon and not higher than max_alt. @@ -141,9 +144,6 @@ public: // tile mgr api bool schedule_scenery(const SGGeod& position, double range_m, double duration=0.0); void materialLibChanged(); - - static const char* subsystemName() { return "scenery"; } - private: // the terrain engine FGTerrain* _terrain; diff --git a/src/Scripting/NasalSys.hxx b/src/Scripting/NasalSys.hxx index fd39faa4f..d6e316189 100644 --- a/src/Scripting/NasalSys.hxx +++ b/src/Scripting/NasalSys.hxx @@ -37,10 +37,15 @@ class FGNasalSys : public SGSubsystem public: FGNasalSys(); virtual ~FGNasalSys(); + + // Subsystem API. void init() override; void shutdown() override; void update(double dt) override; + // Subsystem identification. + static const char* subsystemName() { return "nasal"; } + // Loads a nasal script from an external file and inserts it as a // global module of the specified name. bool loadModule(SGPath file, const char* moduleName); @@ -156,8 +161,6 @@ public: simgear::BufferedLogCallback* log() const { return _log.get(); } - static const char* subsystemName() { return "nasal"; } - private: //friend class FGNasalScript; friend class FGNasalListener; diff --git a/src/Sound/soundmanager.hxx b/src/Sound/soundmanager.hxx index 9d6e6721e..607f77ef1 100644 --- a/src/Sound/soundmanager.hxx +++ b/src/Sound/soundmanager.hxx @@ -38,10 +38,14 @@ public: FGSoundManager(); virtual ~FGSoundManager(); - void init(void); - virtual void shutdown(); - void update(double dt); - void reinit(void); + // Subsystem API. + void init() override; + void reinit() override; + void shutdown() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "sound"; } void activate(bool State); void update_device_list(); @@ -73,8 +77,10 @@ public: FGSoundManager() { fgSetBool("/sim/sound/working", false);} ~FGSoundManager() {} - void update(double dt) {} + // Subsystem API. + void update(double dt) {} override + // Subsystem identification. static const char* subsystemName() { return "sound"; } }; diff --git a/src/Sound/voice.hxx b/src/Sound/voice.hxx index b22651b61..bfaa96d46 100644 --- a/src/Sound/voice.hxx +++ b/src/Sound/voice.hxx @@ -55,9 +55,11 @@ class FGVoiceMgr : public SGSubsystem public: FGVoiceMgr(); ~FGVoiceMgr(); - void init(void); - void shutdown(); - void update(double dt); + + // Subsystem API. + void init() override; + void shutdown() override; + void update(double dt) override; class FGVoice; diff --git a/src/Systems/electrical.hxx b/src/Systems/electrical.hxx index 5eff6779b..1d7ebf63a 100644 --- a/src/Systems/electrical.hxx +++ b/src/Systems/electrical.hxx @@ -219,10 +219,11 @@ public: FGElectricalSystem ( SGPropertyNode *node ); virtual ~FGElectricalSystem (); - void init () override; - void bind () override; - void unbind () override; - void update (double dt) override; + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; bool build (SGPropertyNode* config_props); float propagate( FGElectricalComponent *node, double dt, diff --git a/src/Systems/pitot.hxx b/src/Systems/pitot.hxx index 520a1d08a..4b2c55fe2 100644 --- a/src/Systems/pitot.hxx +++ b/src/Systems/pitot.hxx @@ -44,10 +44,11 @@ public: PitotSystem ( SGPropertyNode *node ); virtual ~PitotSystem (); - virtual void init (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void unbind() override; + void update(double dt) override; private: std::string _name; diff --git a/src/Systems/static.hxx b/src/Systems/static.hxx index 41ea28aa8..f9551721e 100644 --- a/src/Systems/static.hxx +++ b/src/Systems/static.hxx @@ -40,11 +40,12 @@ public: StaticSystem ( int i ); virtual ~StaticSystem (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: std::string _name; diff --git a/src/Systems/system_mgr.hxx b/src/Systems/system_mgr.hxx index f2ea8c0d4..8021e24b4 100644 --- a/src/Systems/system_mgr.hxx +++ b/src/Systems/system_mgr.hxx @@ -30,6 +30,7 @@ class FGSystemMgr : public SGSubsystemGroup public: FGSystemMgr (); virtual ~FGSystemMgr (); + bool build (SGPropertyNode* config_props); }; diff --git a/src/Systems/vacuum.hxx b/src/Systems/vacuum.hxx index 162c203d1..63287de87 100644 --- a/src/Systems/vacuum.hxx +++ b/src/Systems/vacuum.hxx @@ -40,11 +40,12 @@ public: VacuumSystem( int i ); virtual ~VacuumSystem (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; private: std::string _name; diff --git a/src/Time/TimeManager.hxx b/src/Time/TimeManager.hxx index 0f928a857..5b821e941 100644 --- a/src/Time/TimeManager.hxx +++ b/src/Time/TimeManager.hxx @@ -34,15 +34,19 @@ public: TimeManager(); virtual ~TimeManager(); - void computeTimeDeltas(double& simDt, double& realDt); - + // Subsystem API. void init() override; - void reinit() override; void postinit() override; + void reinit() override; void shutdown() override; void unbind() override; void update(double dt) override; + // Subsystem identification. + static const char* subsystemName() { return "time"; } + + void computeTimeDeltas(double& simDt, double& realDt); + // SGPropertyChangeListener overrides void valueChanged(SGPropertyNode *) override; @@ -51,8 +55,6 @@ public: inline double getMPProtocolClockSec() const { return _mpProtocolClock; } inline double getSteadyClockSec() const { return _steadyClock; } - static const char* subsystemName() { return "time"; } - private: /** * Ensure a consistent update-rate using a combination of diff --git a/src/Time/light.hxx b/src/Time/light.hxx index 1d3443f9e..7fd88c13b 100644 --- a/src/Time/light.hxx +++ b/src/Time/light.hxx @@ -139,12 +139,12 @@ public: FGLight (); virtual ~FGLight (); - virtual void init (); - virtual void reinit (); - virtual void bind (); - virtual void unbind (); - virtual void update ( double dt ); - + // Subsystem API. + void bind() override; + void init() override; + void reinit() override; + void unbind() override; + void update(double dt) override; // Color related functions diff --git a/src/Traffic/TrafficMgr.hxx b/src/Traffic/TrafficMgr.hxx index 929602c26..3a790ac52 100644 --- a/src/Traffic/TrafficMgr.hxx +++ b/src/Traffic/TrafficMgr.hxx @@ -113,8 +113,10 @@ private: public: FGTrafficManager(); ~FGTrafficManager(); - void init(); - void update(double time); + + // Subsystem API. + void init() override; + void update(double time) override; FGScheduledFlightVecIterator getFirstFlight(const std::string &ref) { return flights[ref].begin(); } FGScheduledFlightVecIterator getLastFlight(const std::string &ref) { return flights[ref].end(); } diff --git a/src/Viewer/view.hxx b/src/Viewer/view.hxx index 591b5c2f8..1fb6d8af4 100644 --- a/src/Viewer/view.hxx +++ b/src/Viewer/view.hxx @@ -67,10 +67,10 @@ public: // Part 1: standard SGSubsystem implementation. ////////////////////////////////////////////////////////////////////// - virtual void init (); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); + void init() override; + void bind() override; + void unbind() override; + void update(double dt) override; ////////////////////////////////////////////////////////////////////// diff --git a/src/Viewer/viewmgr.hxx b/src/Viewer/viewmgr.hxx index 14f763860..7a5f7f921 100644 --- a/src/Viewer/viewmgr.hxx +++ b/src/Viewer/viewmgr.hxx @@ -49,13 +49,17 @@ public: // Destructor ~FGViewMgr( void ); - virtual void init (); - virtual void postinit(); - virtual void bind (); - virtual void unbind (); - virtual void update (double dt); - virtual void reinit (); - virtual void shutdown(); + // Subsystem API. + void bind() override; + void init() override; + void postinit() override; + void reinit() override; + void shutdown() override; + void unbind() override; + void update(double dt) override; + + // Subsystem identification. + static const char* subsystemName() { return "view-manager"; } // getters inline int size() const { return views.size(); } @@ -75,8 +79,6 @@ public: void add_view( flightgear::View * v ); - static const char* subsystemName() { return "view-manager"; } - private: simgear::TiedPropertyList _tiedProperties; diff --git a/utils/fgpanel/FGPanel.cxx b/utils/fgpanel/FGPanel.cxx index c5feb739a..45e7f0c1f 100644 --- a/utils/fgpanel/FGPanel.cxx +++ b/utils/fgpanel/FGPanel.cxx @@ -168,7 +168,7 @@ FGPanel::unbind () { } void -FGPanel::update (const double dt) { +FGPanel::update (double dt) { getInitDisplayList (); // Draw the instruments. // Syd Adams: added instrument clipping diff --git a/utils/fgpanel/FGPanel.hxx b/utils/fgpanel/FGPanel.hxx index 1be60898d..b08c7d1af 100644 --- a/utils/fgpanel/FGPanel.hxx +++ b/utils/fgpanel/FGPanel.hxx @@ -57,12 +57,11 @@ public: FGPanel (const SGPropertyNode_ptr root); virtual ~FGPanel (); - // Update the panel (every frame). - virtual void init (); - virtual void bind (); - virtual void unbind (); - // virtual void draw (); - virtual void update (const double dt); + // Subsystem API. + void init() override; + void bind() override; + void unbind() override; + void update(double dt) override; // transfer pointer ownership!!! virtual void addInstrument (FGPanelInstrument * const instrument); diff --git a/utils/fgpanel/FGPanelProtocol.hxx b/utils/fgpanel/FGPanelProtocol.hxx index dec45f687..dc85e7fb2 100644 --- a/utils/fgpanel/FGPanelProtocol.hxx +++ b/utils/fgpanel/FGPanelProtocol.hxx @@ -33,11 +33,11 @@ class FGPanelProtocol : public SGSubsystem public: FGPanelProtocol (SGPropertyNode_ptr a_Root); virtual ~FGPanelProtocol (); - virtual void init (); - virtual void reinit (); - virtual void update (double dt); -protected: + // Subsystem API. + void init() override; + void reinit() override; + void update(double dt) override; private: SGPropertyNode_ptr root;