diff --git a/docs-mini/README.introduction b/docs-mini/README.introduction index 1e3be0f4f..e1732763b 100644 --- a/docs-mini/README.introduction +++ b/docs-mini/README.introduction @@ -68,13 +68,28 @@ SGSubsystem and define at least a small set of functions: static const char* staticSubsystemClassId() { return "subsystem-example"; } }; +To register the subsystem with the subsystem manager, for non-instanced +subsystems add: + + // Register the subsystem. + SGSubsystemMgr::Registrant<FGSubsystemExample> registrantFGSubsystemExample + +Or to define a specific subsystem manager group, e.g. DISPLAY, and add any +dependencies: + + // Register the subsystem. + SGSubsystemMgr::Registrant<FGSubsystemExample> registrantFGSubsystemExample( + SGSubsystemMgr::DISPLAY, + {{"viewer", SGSubsystemMgr::Dependency::HARD}, + {"FGRenderer", SGSubsystemMgr::Dependency::NONSUBSYSTEM_HARD}}); + The init() functions should make sure everything is set and ready so the update() function can be run by the main loop. The reinit() function handles everything in case of a reset by the user. The bind() and unbind() functions can be used to tie and untie properties. -After that you can register this class at the subsystem manager: +Finally to create and have the subsystem managed: globals->add_subsystem("example", new FGSubsystemExample); diff --git a/src/AIModel/AIManager.cxx b/src/AIModel/AIManager.cxx index e9789f48c..6a292c7c9 100644 --- a/src/AIModel/AIManager.cxx +++ b/src/AIModel/AIManager.cxx @@ -718,4 +718,9 @@ FGAIAircraft* FGAIManager::getUserAircraft() const return _userAircraft.get(); } +// Register the subsystem. +SGSubsystemMgr::Registrant<FGAIManager> registrantFGAIManager( + SGSubsystemMgr::POST_FDM, + {{"nasal", SGSubsystemMgr::Dependency::HARD}}); + //end AIManager.cxx diff --git a/src/AIModel/performancedb.cxx b/src/AIModel/performancedb.cxx index 7b01e86fe..67c61fb8e 100644 --- a/src/AIModel/performancedb.cxx +++ b/src/AIModel/performancedb.cxx @@ -171,3 +171,6 @@ const string& PerformanceDB::findAlias(const string& acType) const } +// Register the subsystem. +SGSubsystemMgr::Registrant<PerformanceDB> registrantPerformanceDB( + SGSubsystemMgr::POST_FDM); diff --git a/src/AIModel/submodel.cxx b/src/AIModel/submodel.cxx index 838d21648..4cab100d6 100644 --- a/src/AIModel/submodel.cxx +++ b/src/AIModel/submodel.cxx @@ -816,3 +816,8 @@ void FGSubmodelMgr::setParentNode(int id) SG_LOG(SG_AI, SG_ALERT, "AISubmodel: parent node not found "); } } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGSubmodelMgr> registrantFGSubmodelMgr( + SGSubsystemMgr::POST_FDM); diff --git a/src/ATC/atc_mgr.cxx b/src/ATC/atc_mgr.cxx index c5d8fa7e8..02512782c 100644 --- a/src/ATC/atc_mgr.cxx +++ b/src/ATC/atc_mgr.cxx @@ -294,3 +294,9 @@ void FGATCManager::update ( double time ) { (*atc)->update(time); } } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGATCManager> registrantFGATCManager( + SGSubsystemMgr::POST_FDM, + {{"FGAIManager", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Aircraft/FlightHistory.cxx b/src/Aircraft/FlightHistory.cxx index 8d2b6ae82..71abdb311 100644 --- a/src/Aircraft/FlightHistory.cxx +++ b/src/Aircraft/FlightHistory.cxx @@ -225,3 +225,6 @@ size_t FGFlightHistory::currentMemoryUseBytes() const return sizeof(SampleBucket) * m_buckets.size(); } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGFlightHistory> registrantFGFlightHistory; diff --git a/src/Aircraft/controls.cxx b/src/Aircraft/controls.cxx index e49b6e55a..96cf8cb29 100644 --- a/src/Aircraft/controls.cxx +++ b/src/Aircraft/controls.cxx @@ -1881,3 +1881,6 @@ FGControls::set_autopilot_engage( int ap, bool val ) } } } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGControls> registrantFGControls; diff --git a/src/Aircraft/replay.cxx b/src/Aircraft/replay.cxx index 449b4136e..626001e6a 100644 --- a/src/Aircraft/replay.cxx +++ b/src/Aircraft/replay.cxx @@ -1145,3 +1145,7 @@ FGReplay::loadTape(const SGPropertyNode* ConfigData) return loadTape(tapeDirectory, Preview, UserData); } } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGReplay> registrantFGReplay; diff --git a/src/Airports/airportdynamicsmanager.cxx b/src/Airports/airportdynamicsmanager.cxx index 4d09d257b..ce7c7e025 100644 --- a/src/Airports/airportdynamicsmanager.cxx +++ b/src/Airports/airportdynamicsmanager.cxx @@ -106,4 +106,7 @@ FGAirportDynamicsRef AirportDynamicsManager::find(const FGAirportRef& apt) return find(apt->ident()); } +// Register the subsystem. +SGSubsystemMgr::Registrant<AirportDynamicsManager> registrantAirportDynamicsManager; + } // of namespace flightgear diff --git a/src/Autopilot/autopilot.cxx b/src/Autopilot/autopilot.cxx index 1e5714cfc..057479dca 100644 --- a/src/Autopilot/autopilot.cxx +++ b/src/Autopilot/autopilot.cxx @@ -70,6 +70,13 @@ private: simgear::StateMachine_ptr inner; }; + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<StateMachineComponent> registrantStateMachineComponent; +#endif + + class StateMachineFunctor : public FunctorBase<Component> { public: diff --git a/src/Autopilot/digitalfilter.cxx b/src/Autopilot/digitalfilter.cxx index 7e25d4e38..0a58e08d5 100644 --- a/src/Autopilot/digitalfilter.cxx +++ b/src/Autopilot/digitalfilter.cxx @@ -841,3 +841,7 @@ void DigitalFilter::update( bool firstTime, double dt) << "\toutput:" << output << std::endl; } } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<DigitalFilter> registrantDigitalFilter; diff --git a/src/Autopilot/flipflop.cxx b/src/Autopilot/flipflop.cxx index 057564495..63fbbb55b 100644 --- a/src/Autopilot/flipflop.cxx +++ b/src/Autopilot/flipflop.cxx @@ -485,3 +485,5 @@ void FlipFlop::update( bool firstTime, double dt ) } +// Register the subsystem. +SGSubsystemMgr::Registrant<FlipFlop> registrantFlipFlop; diff --git a/src/Autopilot/logic.cxx b/src/Autopilot/logic.cxx index 6ece24993..9b60e5fd7 100644 --- a/src/Autopilot/logic.cxx +++ b/src/Autopilot/logic.cxx @@ -71,3 +71,6 @@ void Logic::update( bool firstTime, double dt ) set_output( get_input() ); } + +// Register the subsystem. +SGSubsystemMgr::Registrant<Logic> registrantLogic; diff --git a/src/Autopilot/pidcontroller.cxx b/src/Autopilot/pidcontroller.cxx index 449817861..a7b033105 100644 --- a/src/Autopilot/pidcontroller.cxx +++ b/src/Autopilot/pidcontroller.cxx @@ -240,3 +240,7 @@ bool PIDController::configure( SGPropertyNode& cfg_node, return AnalogComponent::configure(cfg_node, cfg_name, prop_root); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<PIDController> registrantPIDController; diff --git a/src/Autopilot/pisimplecontroller.cxx b/src/Autopilot/pisimplecontroller.cxx index eed58106e..b11ed3d13 100644 --- a/src/Autopilot/pisimplecontroller.cxx +++ b/src/Autopilot/pisimplecontroller.cxx @@ -87,3 +87,7 @@ void PISimpleController::update( bool firstTime, double dt ) set_output_value( clamped_output ); if ( _debug ) std::cout << "output = " << clamped_output << std::endl; } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<PISimpleController> registrantPISimpleController; diff --git a/src/Autopilot/predictor.cxx b/src/Autopilot/predictor.cxx index 2ff45c941..e650f54c1 100644 --- a/src/Autopilot/predictor.cxx +++ b/src/Autopilot/predictor.cxx @@ -77,3 +77,7 @@ void Predictor::update( bool firstTime, double dt ) _last_value = ivalue; } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<Predictor> registrantPredictor; diff --git a/src/Autopilot/route_mgr.cxx b/src/Autopilot/route_mgr.cxx index 2ac7cc29c..03dcbce7e 100644 --- a/src/Autopilot/route_mgr.cxx +++ b/src/Autopilot/route_mgr.cxx @@ -1317,3 +1317,8 @@ bool FGRouteMgr::commandDeleteUserWaypoint(const SGPropertyNode * arg, SGPropert return FGPositioned::deleteUserWaypoint(ident); } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGRouteMgr> registrantFGRouteMgr( + SGSubsystemMgr::GENERAL, + {{"gui", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Canvas/canvas_mgr.cxx b/src/Canvas/canvas_mgr.cxx index 0869d5d3f..17ff96cbc 100644 --- a/src/Canvas/canvas_mgr.cxx +++ b/src/Canvas/canvas_mgr.cxx @@ -144,3 +144,8 @@ void CanvasMgr::handleModelReinit(SGPropertyNode*) element->reloadPlacements("object"); } } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<CanvasMgr> registrantCanvasMgr( + SGSubsystemMgr::DISPLAY); diff --git a/src/Canvas/gui_mgr.cxx b/src/Canvas/gui_mgr.cxx index 7f64e0eb1..9bcf85af7 100644 --- a/src/Canvas/gui_mgr.cxx +++ b/src/Canvas/gui_mgr.cxx @@ -761,3 +761,10 @@ GUIMgr::addWindowPlacement( SGPropertyNode* placement, } return placements; } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<GUIMgr> registrantGUIMgr( + SGSubsystemMgr::DISPLAY, + {{"viewer", SGSubsystemMgr::Dependency::HARD}, + {"FGRenderer", SGSubsystemMgr::Dependency::NONSUBSYSTEM_HARD}}); diff --git a/src/Cockpit/NavDisplay.cxx b/src/Cockpit/NavDisplay.cxx index d3a114d5e..bfabb9065 100644 --- a/src/Cockpit/NavDisplay.cxx +++ b/src/Cockpit/NavDisplay.cxx @@ -1481,3 +1481,9 @@ void NavDisplay::processCustomSymbols() } +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<NavDisplay> registrantNavDisplay( + SGSubsystemMgr::GENERAL, + {{"route-manager", SGSubsystemMgr::Dependency::HARD}}); +#endif diff --git a/src/Cockpit/agradar.cxx b/src/Cockpit/agradar.cxx index 768fdea41..8051f80fa 100644 --- a/src/Cockpit/agradar.cxx +++ b/src/Cockpit/agradar.cxx @@ -323,3 +323,7 @@ agRadar::update_terrain() } +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<agRadar> registrantagRadar; +#endif diff --git a/src/Cockpit/cockpitDisplayManager.cxx b/src/Cockpit/cockpitDisplayManager.cxx index adca12cc2..9a18a67dd 100644 --- a/src/Cockpit/cockpitDisplayManager.cxx +++ b/src/Cockpit/cockpitDisplayManager.cxx @@ -118,4 +118,9 @@ bool CockpitDisplayManager::build (SGPropertyNode* config_props) return true; } + +// Register the subsystem. +SGSubsystemMgr::Registrant<CockpitDisplayManager> registrantCockpitDisplayManager( + SGSubsystemMgr::DISPLAY); + } // of namespace flightgear diff --git a/src/Cockpit/groundradar.cxx b/src/Cockpit/groundradar.cxx index a142f4c22..52403be02 100644 --- a/src/Cockpit/groundradar.cxx +++ b/src/Cockpit/groundradar.cxx @@ -349,4 +349,10 @@ void GroundRadar::updateTexture() getCamera()->setNodeMask(0xffffffff); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<GroundRadar> registrantGroundRadar; +#endif + // end of GroundRadar.cxx diff --git a/src/Cockpit/wxradar.cxx b/src/Cockpit/wxradar.cxx index 118c49760..1165d93de 100644 --- a/src/Cockpit/wxradar.cxx +++ b/src/Cockpit/wxradar.cxx @@ -1117,3 +1117,8 @@ wxRadarBg::valueChanged(SGPropertyNode*) _time = _interval; } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<wxRadarBg> registrantwxRadarBg; +#endif diff --git a/src/Environment/environment_ctrl.cxx b/src/Environment/environment_ctrl.cxx index 810dc4e7a..09dd002dd 100644 --- a/src/Environment/environment_ctrl.cxx +++ b/src/Environment/environment_ctrl.cxx @@ -351,4 +351,9 @@ LayerInterpolateController * LayerInterpolateController::createInstance( SGPrope ////////////////////////////////////////////////////////////////////////////// +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<LayerInterpolateControllerImplementation> registrantLayerInterpolateControllerImplementation; +#endif + } // namespace diff --git a/src/Environment/environment_mgr.cxx b/src/Environment/environment_mgr.cxx index 49ec2258e..aace14d6d 100644 --- a/src/Environment/environment_mgr.cxx +++ b/src/Environment/environment_mgr.cxx @@ -428,4 +428,7 @@ FGEnvironmentMgr::set_cloud_layer_coverage_type (int index, int type ) } +// Register the subsystem. +SGSubsystemMgr::Registrant<FGEnvironmentMgr> registrantFGEnvironmentMgr; + // end of environment-mgr.cxx diff --git a/src/Environment/ephemeris.cxx b/src/Environment/ephemeris.cxx index 8b6a75399..db9d59b1e 100644 --- a/src/Environment/ephemeris.cxx +++ b/src/Environment/ephemeris.cxx @@ -105,3 +105,7 @@ void Ephemeris::update(double) // Update the moonlight intensity. _moonlight->setDoubleValue(_impl->get_moon()->getIlluminanceFactor()); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<Ephemeris> registrantEphemeris; diff --git a/src/Environment/magvarmanager.cxx b/src/Environment/magvarmanager.cxx index ed02b651f..0fd61bb3c 100644 --- a/src/Environment/magvarmanager.cxx +++ b/src/Environment/magvarmanager.cxx @@ -69,3 +69,7 @@ void FGMagVarManager::update(double dt) _magDipNode->setDoubleValue(_magVar->get_magdip() * SG_RADIANS_TO_DEGREES); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGMagVarManager> registrantFGMagVarManager; diff --git a/src/Environment/precipitation_mgr.cxx b/src/Environment/precipitation_mgr.cxx index ee48da79a..fd74ca184 100644 --- a/src/Environment/precipitation_mgr.cxx +++ b/src/Environment/precipitation_mgr.cxx @@ -292,3 +292,10 @@ void FGPrecipitationMgr::update(double dt) // Update the drawing... precipitation->update(); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGPrecipitationMgr> registrantFGPrecipitationMgr( + SGSubsystemMgr::GENERAL, + {{"FGScenery", SGSubsystemMgr::Dependency::HARD}, + {"SGSky", SGSubsystemMgr::Dependency::NONSUBSYSTEM_HARD}}); diff --git a/src/Environment/realwx_ctrl.cxx b/src/Environment/realwx_ctrl.cxx index 7e255e42f..3a3142de6 100644 --- a/src/Environment/realwx_ctrl.cxx +++ b/src/Environment/realwx_ctrl.cxx @@ -398,6 +398,7 @@ void BasicRealWxController::checkNearbyMetar() } + /* -------------------------------------------------------------------------------- */ class NoaaMetarRealWxController : public BasicRealWxController, MetarRequester @@ -497,6 +498,16 @@ void NoaaMetarRealWxController::requestMetar } } +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<NoaaMetarRealWxController> registrantNoaaMetarRealWxController( + SGSubsystemMgr::GENERAL, + {{"environment", SGSubsystemMgr::Dependency::SOFT}, + {"FGHTTPClient", SGSubsystemMgr::Dependency::SOFT}, + {"realwx", SGSubsystemMgr::Dependency::SOFT}}); +#endif + + /* -------------------------------------------------------------------------------- */ RealWxController * RealWxController::createInstance( SGPropertyNode_ptr rootNode ) diff --git a/src/Environment/ridge_lift.cxx b/src/Environment/ridge_lift.cxx index bb461216d..f1315fe0b 100644 --- a/src/Environment/ridge_lift.cxx +++ b/src/Environment/ridge_lift.cxx @@ -210,3 +210,7 @@ void FGRidgeLift::update(double dt) { strength = fgGetLowPass( strength, lift_mps * SG_METER_TO_FEET, dt ); _ridge_lift_fps_node->setDoubleValue( strength ); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGRidgeLift> registrantFGRidgeLift; diff --git a/src/Environment/terrainsampler.cxx b/src/Environment/terrainsampler.cxx index d8b0ac8b1..0f4e0ba36 100644 --- a/src/Environment/terrainsampler.cxx +++ b/src/Environment/terrainsampler.cxx @@ -317,6 +317,12 @@ append(alt_50_array, alt_med); #endif } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<AreaSampler> registrantAreaSampler; +#endif + /* --------------------- End of AreaSampler implementation ------------- */ /* --------------------- TerrainSamplerImplementation -------------------------- */ diff --git a/src/FDM/ExternalNet/ExternalNet.cxx b/src/FDM/ExternalNet/ExternalNet.cxx index aafa2c104..85c847b3f 100644 --- a/src/FDM/ExternalNet/ExternalNet.cxx +++ b/src/FDM/ExternalNet/ExternalNet.cxx @@ -230,3 +230,9 @@ void FGExternalNet::update( double dt ) { FGNetFDM2Props( &fdm ); } } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGExternalNet> registrantFGExternalNet; +#endif diff --git a/src/FDM/ExternalPipe/ExternalPipe.cxx b/src/FDM/ExternalPipe/ExternalPipe.cxx index 94e48c915..9e052b5b9 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.cxx +++ b/src/FDM/ExternalPipe/ExternalPipe.cxx @@ -582,3 +582,7 @@ void FGExternalPipe::update_property( double dt ) { } +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGExternalPipe> registrantFGExternalPipe; +#endif diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index 5d9474b5f..1c4e323d3 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -1629,3 +1629,9 @@ void FGJSBsim::update_external_forces(double t_off) if (_mmag) _mmag->setDoubleValue(0.0); } } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGJSBsim> registrantFGJSBsim; +#endif diff --git a/src/FDM/LaRCsim/LaRCsim.cxx b/src/FDM/LaRCsim/LaRCsim.cxx index 239f63744..deba568ab 100644 --- a/src/FDM/LaRCsim/LaRCsim.cxx +++ b/src/FDM/LaRCsim/LaRCsim.cxx @@ -948,3 +948,8 @@ void FGLaRCsim::set_Density(double rho) { } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGLaRCsim> registrantFGLaRCsim; +#endif diff --git a/src/FDM/NullFDM.cxx b/src/FDM/NullFDM.cxx index a9f8a0af4..92f1c4f8c 100644 --- a/src/FDM/NullFDM.cxx +++ b/src/FDM/NullFDM.cxx @@ -55,3 +55,9 @@ void FGNullFDM::update( double dt ) { // That is just to trigger ground level computations _updateGeodeticPosition(get_Latitude(), get_Longitude(), get_Altitude()); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGNullFDM> registrantFGNullFDM; +#endif diff --git a/src/FDM/SP/ACMS.cxx b/src/FDM/SP/ACMS.cxx index 6fd219bc9..e717e1695 100644 --- a/src/FDM/SP/ACMS.cxx +++ b/src/FDM/SP/ACMS.cxx @@ -108,3 +108,9 @@ void FGACMS::update( double dt ) { _set_Sea_level_radius( sl_radius * SG_METER_TO_FEET); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGACMS> registrantFGACMS; +#endif diff --git a/src/FDM/SP/ADA.cxx b/src/FDM/SP/ADA.cxx index 40bd8aee2..711018b6f 100644 --- a/src/FDM/SP/ADA.cxx +++ b/src/FDM/SP/ADA.cxx @@ -331,3 +331,9 @@ bool FGADA::copy_from_FGADA() { return true; } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGADA> registrantFGADA; +#endif diff --git a/src/FDM/SP/AISim.cpp b/src/FDM/SP/AISim.cpp index 69a8c4598..e9759c237 100644 --- a/src/FDM/SP/AISim.cpp +++ b/src/FDM/SP/AISim.cpp @@ -706,3 +706,8 @@ FGAISim::load(std::string path) return true; } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGAISim> registrantFGAISim; +#endif diff --git a/src/FDM/SP/Balloon.cxx b/src/FDM/SP/Balloon.cxx index ee517e53e..8c48ce238 100644 --- a/src/FDM/SP/Balloon.cxx +++ b/src/FDM/SP/Balloon.cxx @@ -199,3 +199,7 @@ bool FGBalloonSim::copy_from_BalloonSim() { } +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGBalloonSim> registrantFGBalloonSim; +#endif diff --git a/src/FDM/SP/MagicCarpet.cxx b/src/FDM/SP/MagicCarpet.cxx index bd2fd8b9c..496c131b7 100644 --- a/src/FDM/SP/MagicCarpet.cxx +++ b/src/FDM/SP/MagicCarpet.cxx @@ -117,3 +117,9 @@ void FGMagicCarpet::update( double dt ) { _set_Altitude( get_Altitude() + climb ); _set_Altitude_AGL( get_Altitude() - get_Runway_altitude() ); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGMagicCarpet> registrantFGMagicCarpet; +#endif diff --git a/src/FDM/UFO.cxx b/src/FDM/UFO.cxx index 4a538e4e0..14a462bba 100644 --- a/src/FDM/UFO.cxx +++ b/src/FDM/UFO.cxx @@ -192,3 +192,7 @@ void FGUFO::update( double dt ) { } +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGUFO> registrantFGUFO; +#endif diff --git a/src/FDM/YASim/YASim.cxx b/src/FDM/YASim/YASim.cxx index 7ef60c2ef..33897b70d 100644 --- a/src/FDM/YASim/YASim.cxx +++ b/src/FDM/YASim/YASim.cxx @@ -574,3 +574,9 @@ void YASim::reinit() // get current FDM values from the property tree copyToYASim(true); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<YASim> registrantYASim; +#endif diff --git a/src/FDM/fdm_shell.cxx b/src/FDM/fdm_shell.cxx index b164e71db..40693b5b0 100644 --- a/src/FDM/fdm_shell.cxx +++ b/src/FDM/fdm_shell.cxx @@ -384,3 +384,8 @@ void FDMShell::createImplementation() "If you still need it, please rebuild FlightGear and enable its support.")); } } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FDMShell> registrantFDMShell( + SGSubsystemMgr::FDM); diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index 8ed36427e..e99c15f92 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -459,4 +459,9 @@ NewGUI::setupFont (SGPropertyNode *node) return; } + +// Register the subsystem. +SGSubsystemMgr::Registrant<NewGUI> registrantNewGUI( + SGSubsystemMgr::INIT); + // end of new_gui.cxx diff --git a/src/Input/FGHIDEventInput.cxx b/src/Input/FGHIDEventInput.cxx index 3343da7b0..4422a73ea 100644 --- a/src/Input/FGHIDEventInput.cxx +++ b/src/Input/FGHIDEventInput.cxx @@ -919,6 +919,10 @@ void FGHIDEventInput::update(double dt) FGEventInput::update(dt); } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGHIDEventInput> registrantFGHIDEventInput; + /////////////////////////////////////////////////////////////////////////////////////////////// void FGHIDEventInput::FGHIDEventInputPrivate::evaluateDevice(hid_device_info* deviceInfo) diff --git a/src/Input/FGJoystickInput.cxx b/src/Input/FGJoystickInput.cxx index 16a2fdc6d..c161d449c 100644 --- a/src/Input/FGJoystickInput.cxx +++ b/src/Input/FGJoystickInput.cxx @@ -409,3 +409,8 @@ void FGJoystickInput::update( double dt ) } } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGJoystickInput> registrantFGJoystickInput( + SGSubsystemMgr::GENERAL, + {{"nasal", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Input/FGKeyboardInput.cxx b/src/Input/FGKeyboardInput.cxx index 05bb1ce4a..3bee96c17 100644 --- a/src/Input/FGKeyboardInput.cxx +++ b/src/Input/FGKeyboardInput.cxx @@ -250,3 +250,9 @@ void FGKeyboardInput::keyHandler(int key, int keymod, int mousex, int mousey) if( keyboardInput) keyboardInput->doKey(key, keymod, mousex, mousey); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGKeyboardInput> registrantFGKeyboardInput( + SGSubsystemMgr::GENERAL, + {{"nasal", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Input/FGMouseInput.cxx b/src/Input/FGMouseInput.cxx index eb666154f..2e2930079 100644 --- a/src/Input/FGMouseInput.cxx +++ b/src/Input/FGMouseInput.cxx @@ -719,3 +719,7 @@ bool FGMouseInput::isActiveModePassThrough() const return m.modes[mode].pass_through; } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGMouseInput> registrantFGMouseInput; diff --git a/src/Input/input.cxx b/src/Input/input.cxx index d8834d46f..d13586fbd 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -100,3 +100,7 @@ FGInput::~FGInput () { // SGSubsystemGroup deletes all subsystem in it's destructor } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGInput> registrantFGInput; diff --git a/src/Instrumentation/HUD/HUD.cxx b/src/Instrumentation/HUD/HUD.cxx index 48db45dc9..1c409f012 100644 --- a/src/Instrumentation/HUD/HUD.cxx +++ b/src/Instrumentation/HUD/HUD.cxx @@ -649,6 +649,10 @@ void HUDText::draw() } +// Register the subsystem. +SGSubsystemMgr::Registrant<HUD> registrantHUD; + + void TextList::align(const char *s, int align, float *x, float *y, float *l, float *r, float *b, float *t) const { diff --git a/src/Instrumentation/KLN89/kln89.cxx b/src/Instrumentation/KLN89/kln89.cxx index 36f663b5b..e2b0f0517 100644 --- a/src/Instrumentation/KLN89/kln89.cxx +++ b/src/Instrumentation/KLN89/kln89.cxx @@ -1608,3 +1608,9 @@ char KLN89::DecChar(char c, bool gap, bool wrap) { if(c == ' ') return('9'); return(c - 1); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<KLN89> registrantKLN89; +#endif diff --git a/src/Instrumentation/adf.cxx b/src/Instrumentation/adf.cxx index 60f4ff094..ce9bac76e 100644 --- a/src/Instrumentation/adf.cxx +++ b/src/Instrumentation/adf.cxx @@ -270,4 +270,12 @@ ADF::set_bearing (double dt, double bearing_deg) } +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<ADF> registrantADF( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 0.15); +#endif + // end of adf.cxx diff --git a/src/Instrumentation/airspeed_indicator.cxx b/src/Instrumentation/airspeed_indicator.cxx index 16900e6ba..2625def2c 100644 --- a/src/Instrumentation/airspeed_indicator.cxx +++ b/src/Instrumentation/airspeed_indicator.cxx @@ -159,4 +159,12 @@ AirspeedIndicator::computeMach() _tas_node->setDoubleValue(V_true * SG_MPS_TO_KT ); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<AirspeedIndicator> registrantAirspeedIndicator( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of airspeed_indicator.cxx diff --git a/src/Instrumentation/altimeter.cxx b/src/Instrumentation/altimeter.cxx index a691f1e90..e03ba8bf2 100644 --- a/src/Instrumentation/altimeter.cxx +++ b/src/Instrumentation/altimeter.cxx @@ -144,4 +144,12 @@ Altimeter::update (double dt) } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<Altimeter> registrantAltimeter( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of altimeter.cxx diff --git a/src/Instrumentation/attitude_indicator.cxx b/src/Instrumentation/attitude_indicator.cxx index 3720c2c82..a592b636d 100644 --- a/src/Instrumentation/attitude_indicator.cxx +++ b/src/Instrumentation/attitude_indicator.cxx @@ -180,4 +180,12 @@ AttitudeIndicator::update (double dt) _pitch_out_node->setDoubleValue(pitch + pitch_error); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<AttitudeIndicator> registrantAttitudeIndicator( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of attitude_indicator.cxx diff --git a/src/Instrumentation/clock.cxx b/src/Instrumentation/clock.cxx index 39f6f582f..fa1dfc9d0 100644 --- a/src/Instrumentation/clock.cxx +++ b/src/Instrumentation/clock.cxx @@ -131,4 +131,12 @@ Clock::update (double delta_time_sec) } +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<Clock> registrantClock( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 0.25); +#endif + // end of clock.cxx diff --git a/src/Instrumentation/commradio.cxx b/src/Instrumentation/commradio.cxx index 56e3a959b..2ac6e1104 100644 --- a/src/Instrumentation/commradio.cxx +++ b/src/Instrumentation/commradio.cxx @@ -720,5 +720,13 @@ SGSubsystem * CommRadio::createInstance(SGPropertyNode_ptr rootNode) return new CommRadioImpl(rootNode); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<CommRadio> registrantCommRadio( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + } // namespace Instrumentation diff --git a/src/Instrumentation/dme.cxx b/src/Instrumentation/dme.cxx index 72ee31ec9..a0e7fb45d 100644 --- a/src/Instrumentation/dme.cxx +++ b/src/Instrumentation/dme.cxx @@ -253,4 +253,12 @@ void DME::clear() _audioIdent->setIdent("", 0.0); } +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<DME> registrantDME( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 1.0); +#endif + // end of dme.cxx diff --git a/src/Instrumentation/gps.cxx b/src/Instrumentation/gps.cxx index e2cf44995..d7717e33f 100644 --- a/src/Instrumentation/gps.cxx +++ b/src/Instrumentation/gps.cxx @@ -1601,4 +1601,12 @@ void GPS::tieSGGeodReadOnly(SGPropertyNode* aNode, SGGeod& aRef, } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<GPS> registrantGPS( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of gps.cxx diff --git a/src/Instrumentation/gsdi.cxx b/src/Instrumentation/gsdi.cxx index b383f3c3e..262c22783 100644 --- a/src/Instrumentation/gsdi.cxx +++ b/src/Instrumentation/gsdi.cxx @@ -83,4 +83,12 @@ void GSDI::update(double /*delta_time_sec*/) _drift_angleN->setDoubleValue(angle); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<GSDI> registrantGSDI( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of gsdi.cxx diff --git a/src/Instrumentation/heading_indicator.cxx b/src/Instrumentation/heading_indicator.cxx index d95a1a084..9edd260f7 100644 --- a/src/Instrumentation/heading_indicator.cxx +++ b/src/Instrumentation/heading_indicator.cxx @@ -128,4 +128,12 @@ HeadingIndicator::update (double dt) _heading_bug_error_node->setDoubleValue( diff ); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<HeadingIndicator> registrantHeadingIndicator( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of heading_indicator.cxx diff --git a/src/Instrumentation/heading_indicator_dg.cxx b/src/Instrumentation/heading_indicator_dg.cxx index 0c5fdf879..8c37ad941 100644 --- a/src/Instrumentation/heading_indicator_dg.cxx +++ b/src/Instrumentation/heading_indicator_dg.cxx @@ -204,4 +204,12 @@ HeadingIndicatorDG::update (double dt) } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<HeadingIndicatorDG> registrantHeadingIndicatorDG( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of heading_indicator_dg.cxx diff --git a/src/Instrumentation/heading_indicator_fg.cxx b/src/Instrumentation/heading_indicator_fg.cxx index 32332a3e1..07aa84754 100644 --- a/src/Instrumentation/heading_indicator_fg.cxx +++ b/src/Instrumentation/heading_indicator_fg.cxx @@ -184,4 +184,12 @@ HeadingIndicatorFG::update (double dt) } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<HeadingIndicatorFG> registrantHeadingIndicatorFG( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of heading_indicator_fg.cxx diff --git a/src/Instrumentation/inst_vertical_speed_indicator.cxx b/src/Instrumentation/inst_vertical_speed_indicator.cxx index c1b8f90b9..c01e8988f 100644 --- a/src/Instrumentation/inst_vertical_speed_indicator.cxx +++ b/src/Instrumentation/inst_vertical_speed_indicator.cxx @@ -238,4 +238,12 @@ void InstVerticalSpeedIndicator::update (double dt) } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<InstVerticalSpeedIndicator> registrantInstVerticalSpeedIndicator( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of inst_vertical_speed_indicator.cxx diff --git a/src/Instrumentation/instrument_mgr.cxx b/src/Instrumentation/instrument_mgr.cxx index 74235f987..ff978e176 100644 --- a/src/Instrumentation/instrument_mgr.cxx +++ b/src/Instrumentation/instrument_mgr.cxx @@ -226,4 +226,9 @@ bool FGInstrumentMgr::build (SGPropertyNode* config_props) return true; } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGInstrumentMgr> registrantFGInstrumentMgr( + SGSubsystemMgr::FDM); + // end of instrument_manager.cxx diff --git a/src/Instrumentation/kr_87.cxx b/src/Instrumentation/kr_87.cxx index 4f84d821e..35ffc9dd1 100644 --- a/src/Instrumentation/kr_87.cxx +++ b/src/Instrumentation/kr_87.cxx @@ -537,3 +537,12 @@ int FGKR_87::get_stby_freq() const { } } } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<FGKR_87> registrantFGKR_87( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}, + {"sound", SGSubsystemMgr::Dependency::HARD}}); +#endif diff --git a/src/Instrumentation/mag_compass.cxx b/src/Instrumentation/mag_compass.cxx index 30dc1fb73..97586b59b 100644 --- a/src/Instrumentation/mag_compass.cxx +++ b/src/Instrumentation/mag_compass.cxx @@ -199,4 +199,12 @@ MagCompass::update (double delta_time_sec) _out_node->setDoubleValue(indicated_deg); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<MagCompass> registrantMagCompass( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of altimeter.cxx diff --git a/src/Instrumentation/marker_beacon.cxx b/src/Instrumentation/marker_beacon.cxx index a12843391..aadfe6204 100644 --- a/src/Instrumentation/marker_beacon.cxx +++ b/src/Instrumentation/marker_beacon.cxx @@ -340,3 +340,11 @@ void FGMarkerBeacon::search() last_beacon = NOBEACON; } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<FGMarkerBeacon> registrantFGMarkerBeacon( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 0.2); +#endif diff --git a/src/Instrumentation/mk_viii.cxx b/src/Instrumentation/mk_viii.cxx index 650af6a1d..07a9734d6 100644 --- a/src/Instrumentation/mk_viii.cxx +++ b/src/Instrumentation/mk_viii.cxx @@ -4700,3 +4700,12 @@ MK_VIII::update (double dt) alert_handler.update(); io_handler.update_outputs(); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<MK_VIII> registrantMK_VIII( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 0.2); +#endif diff --git a/src/Instrumentation/mrg.cxx b/src/Instrumentation/mrg.cxx index 3f914b282..9a31cc67b 100644 --- a/src/Instrumentation/mrg.cxx +++ b/src/Instrumentation/mrg.cxx @@ -296,4 +296,12 @@ MasterReferenceGyro::update (double dt) _hdg_rate_out_node ->setDoubleValue( _indicated_hdg_rate ); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<MasterReferenceGyro> registrantMasterReferenceGyro( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of mrg.cxx diff --git a/src/Instrumentation/navradio.cxx b/src/Instrumentation/navradio.cxx index 20b77e393..d448d7fdf 100644 --- a/src/Instrumentation/navradio.cxx +++ b/src/Instrumentation/navradio.cxx @@ -967,3 +967,11 @@ void FGNavRadio::updateNav() id_c3_node->setIntValue( (int)identBuffer[2] ); id_c4_node->setIntValue( (int)identBuffer[3] ); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<FGNavRadio> registrantFGNavRadio( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif diff --git a/src/Instrumentation/newnavradio.cxx b/src/Instrumentation/newnavradio.cxx index 767878aee..cb97064c9 100644 --- a/src/Instrumentation/newnavradio.cxx +++ b/src/Instrumentation/newnavradio.cxx @@ -972,5 +972,13 @@ SGSubsystem * NavRadio::createInstance( SGPropertyNode_ptr rootNode ) return new FGNavRadio( rootNode ); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<NavRadio> registrantNavRadio( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + } // namespace Instrumentation diff --git a/src/Instrumentation/rad_alt.cxx b/src/Instrumentation/rad_alt.cxx index 0ab143bbd..4ddbfd9da 100644 --- a/src/Instrumentation/rad_alt.cxx +++ b/src/Instrumentation/rad_alt.cxx @@ -216,3 +216,10 @@ SGVec3d RadarAltimeter::rayVector(double az, double el) const } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<RadarAltimeter> registrantRadarAltimeter( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif diff --git a/src/Instrumentation/slip_skid_ball.cxx b/src/Instrumentation/slip_skid_ball.cxx index 4bb1f916b..252e9af2e 100644 --- a/src/Instrumentation/slip_skid_ball.cxx +++ b/src/Instrumentation/slip_skid_ball.cxx @@ -59,4 +59,13 @@ SlipSkidBall::update (double delta_time_sec) } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<SlipSkidBall> registrantSlipSkidBall( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 0.03); +#endif + // end of slip_skid_ball.cxx diff --git a/src/Instrumentation/tacan.cxx b/src/Instrumentation/tacan.cxx index 50cb5863c..4f7f5df61 100644 --- a/src/Instrumentation/tacan.cxx +++ b/src/Instrumentation/tacan.cxx @@ -360,4 +360,13 @@ TACAN::valueChanged(SGPropertyNode *prop) _listener_active--; } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<TACAN> registrantTACAN( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 0.2); +#endif + // end of TACAN.cxx diff --git a/src/Instrumentation/tcas.cxx b/src/Instrumentation/tcas.cxx index c28ec5b57..2c63c3ed3 100644 --- a/src/Instrumentation/tcas.cxx +++ b/src/Instrumentation/tcas.cxx @@ -1527,3 +1527,12 @@ TCAS::Tracker::getThreatLevel(string callsign) else return 0; } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<TCAS> registrantTCAS( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 0.2); +#endif diff --git a/src/Instrumentation/transponder.cxx b/src/Instrumentation/transponder.cxx index 4bb552609..8dca7cb61 100644 --- a/src/Instrumentation/transponder.cxx +++ b/src/Instrumentation/transponder.cxx @@ -347,3 +347,10 @@ bool Transponder::isPowerSwitchOn() const } +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<Transponder> registrantTransponder( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}, + 0.2); +#endif diff --git a/src/Instrumentation/turn_indicator.cxx b/src/Instrumentation/turn_indicator.cxx index 683a44336..2071820cd 100644 --- a/src/Instrumentation/turn_indicator.cxx +++ b/src/Instrumentation/turn_indicator.cxx @@ -113,4 +113,12 @@ TurnIndicator::update (double dt) _rate_out_node->setDoubleValue(rate); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<TurnIndicator> registrantTurnIndicator( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of turn_indicator.cxx diff --git a/src/Instrumentation/vertical_speed_indicator.cxx b/src/Instrumentation/vertical_speed_indicator.cxx index e4f3f908c..2fe645bab 100644 --- a/src/Instrumentation/vertical_speed_indicator.cxx +++ b/src/Instrumentation/vertical_speed_indicator.cxx @@ -139,4 +139,12 @@ VerticalSpeedIndicator::update (double dt) } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::InstancedRegistrant<VerticalSpeedIndicator> registrantVerticalSpeedIndicator( + SGSubsystemMgr::FDM, + {{"instrumentation", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of vertical_speed_indicator.cxx diff --git a/src/Main/FGInterpolator.cxx b/src/Main/FGInterpolator.cxx index 89cb66804..d0a7d1312 100644 --- a/src/Main/FGInterpolator.cxx +++ b/src/Main/FGInterpolator.cxx @@ -35,3 +35,8 @@ FGInterpolator::~FGInterpolator() if( SGPropertyNode::getInterpolationMgr() == this ) SGPropertyNode::setInterpolationMgr(0); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGInterpolator> registrantFGInterpolator( + SGSubsystemMgr::INIT); diff --git a/src/Main/fg_io.cxx b/src/Main/fg_io.cxx index 480ba0e7f..06ed0ed59 100644 --- a/src/Main/fg_io.cxx +++ b/src/Main/fg_io.cxx @@ -450,3 +450,6 @@ bool FGIO::isMultiplayerRequested() { return (channelOption.find("multiplay") == 0); }); return it != channels->end(); } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGIO> registrantFGIO; diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index 441303f05..2058f0db1 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -494,6 +494,9 @@ FGProperties::update (double dt) } +// Register the subsystem. +SGSubsystemMgr::Registrant<FGProperties> registrantFGProperties; + //////////////////////////////////////////////////////////////////////// // Save and restore. diff --git a/src/Main/logger.cxx b/src/Main/logger.cxx index 98e79e1c7..b402c276e 100644 --- a/src/Main/logger.cxx +++ b/src/Main/logger.cxx @@ -164,4 +164,8 @@ FGLogger::Log::Log () { } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGLogger> registrantFGLogger; + // end of logger.cxx diff --git a/src/Model/acmodel.cxx b/src/Model/acmodel.cxx index 0e852e37b..c705de7c6 100644 --- a/src/Model/acmodel.cxx +++ b/src/Model/acmodel.cxx @@ -210,4 +210,8 @@ FGAircraftModel::update (double dt) } +// Register the subsystem. +SGSubsystemMgr::Registrant<FGAircraftModel> registrantFGAircraftModel( + SGSubsystemMgr::DISPLAY); + // end of model.cxx diff --git a/src/Model/modelmgr.cxx b/src/Model/modelmgr.cxx index 6cbb6181a..f70f8918a 100644 --- a/src/Model/modelmgr.cxx +++ b/src/Model/modelmgr.cxx @@ -313,4 +313,9 @@ FGModelMgr::Listener::childRemoved(SGPropertyNode * parent, SGPropertyNode * chi } } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGModelMgr> registrantFGModelMgr( + SGSubsystemMgr::DISPLAY); + // end of modelmgr.cxx diff --git a/src/MultiPlayer/multiplaymgr.cxx b/src/MultiPlayer/multiplaymgr.cxx index 0271c10c4..ef66c0f81 100644 --- a/src/MultiPlayer/multiplaymgr.cxx +++ b/src/MultiPlayer/multiplaymgr.cxx @@ -2377,3 +2377,12 @@ FGMultiplayMgr::findProperties() SG_LOG(SG_NETWORK, SG_DEBUG, "activating MP property:" << pNode->getPath()); } } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGMultiplayMgr> registrantFGMultiplayMgr( + SGSubsystemMgr::POST_FDM, + {{"ai-model", SGSubsystemMgr::Dependency::HARD}, + {"flight", SGSubsystemMgr::Dependency::HARD}, + {"mp", SGSubsystemMgr::Dependency::HARD}, + {"time", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Network/DNSClient.cxx b/src/Network/DNSClient.cxx index fff953a20..655d44d7e 100644 --- a/src/Network/DNSClient.cxx +++ b/src/Network/DNSClient.cxx @@ -69,3 +69,7 @@ void FGDNSClient::makeRequest(const simgear::DNS::Request_ptr& req) { _dns->makeRequest(req); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGDNSClient> registrantFGDNSClient; diff --git a/src/Network/HTTPClient.cxx b/src/Network/HTTPClient.cxx index 1f9a90075..1e3e72faa 100644 --- a/src/Network/HTTPClient.cxx +++ b/src/Network/HTTPClient.cxx @@ -297,3 +297,9 @@ void FGHTTPClient::makeRequest(const simgear::HTTP::Request_ptr& req) { _http->makeRequest(req); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGHTTPClient> registrantFGHTTPClient( + SGSubsystemMgr::GENERAL, + {{"nasal", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Network/Swift/swift_connection.cxx b/src/Network/Swift/swift_connection.cxx index 035a93fd2..d8011222c 100644 --- a/src/Network/Swift/swift_connection.cxx +++ b/src/Network/Swift/swift_connection.cxx @@ -102,3 +102,7 @@ void SwiftConnection::reinit() shutdown(); init(); } + +// Register the subsystem. +SGSubsystemMgr::Registrant<SwiftConnection> registrantSwiftConnection( + SGSubsystemMgr::POST_FDM); diff --git a/src/Network/fgcom.cxx b/src/Network/fgcom.cxx index 40f24e458..333a12543 100644 --- a/src/Network/fgcom.cxx +++ b/src/Network/fgcom.cxx @@ -723,3 +723,5 @@ bool FGCom::isInRange(const double &freq) const } +// Register the subsystem. +SGSubsystemMgr::Registrant<FGCom> registrantFGCom; diff --git a/src/Network/http/httpd.cxx b/src/Network/http/httpd.cxx index d3f83fe46..4cad46892 100644 --- a/src/Network/http/httpd.cxx +++ b/src/Network/http/httpd.cxx @@ -642,5 +642,11 @@ FGHttpd * FGHttpd::createInstance(SGPropertyNode_ptr configNode) return new MongooseHttpd(configNode); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<MongooseHttpd> registrantMongooseHttpd; +#endif + } // namespace http } // namespace flightgear diff --git a/src/Scenery/scenery.cxx b/src/Scenery/scenery.cxx index 953f0abf6..dacf9ffe8 100644 --- a/src/Scenery/scenery.cxx +++ b/src/Scenery/scenery.cxx @@ -501,3 +501,10 @@ void FGScenery::resetPagerSingleton() { pager = NULL; } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGScenery> registrantFGScenery( + SGSubsystemMgr::DISPLAY, + {{"FGRenderer", SGSubsystemMgr::Dependency::NONSUBSYSTEM_HARD}, + {"SGSky", SGSubsystemMgr::Dependency::NONSUBSYSTEM_HARD}}); diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index d6d272b95..2863524d4 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -1620,6 +1620,11 @@ void FGNasalSys::removePersistentTimer(TimerObj* obj) _persistentTimers.erase(it); } +// Register the subsystem. +SGSubsystemMgr::Registrant<FGNasalSys> registrantFGNasalSys( + SGSubsystemMgr::INIT); + + ////////////////////////////////////////////////////////////////////////// // FGNasalListener class. diff --git a/src/Sound/soundmanager.cxx b/src/Sound/soundmanager.cxx index 3c928395f..bf6b72a23 100644 --- a/src/Sound/soundmanager.cxx +++ b/src/Sound/soundmanager.cxx @@ -240,5 +240,10 @@ VoiceSynthesizer * FGSoundManager::getSynthesizer( const std::string & voice ) } return it->second; } - #endif // ENABLE_AUDIO_SUPPORT + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGSoundManager> registrantFGSoundManager( + SGSubsystemMgr::SOUND, + {{"SGSoundMgr", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Sound/voice.cxx b/src/Sound/voice.cxx index 1b39482e9..51ebe16c0 100644 --- a/src/Sound/voice.cxx +++ b/src/Sound/voice.cxx @@ -137,6 +137,9 @@ void FGVoiceMgr::update(double dt) } +// Register the subsystem. +SGSubsystemMgr::Registrant<FGVoiceMgr> registrantFGVoiceMgr( + SGSubsystemMgr::DISPLAY); /// VOICE /// diff --git a/src/Systems/electrical.cxx b/src/Systems/electrical.cxx index 22454d892..689bdc97d 100644 --- a/src/Systems/electrical.cxx +++ b/src/Systems/electrical.cxx @@ -732,3 +732,9 @@ FGElectricalComponent *FGElectricalSystem::find ( const string &name ) { // nothing found return NULL; } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGElectricalSystem> registrantFGElectricalSystem; +#endif diff --git a/src/Systems/pitot.cxx b/src/Systems/pitot.cxx index cf3eb2590..d05633b47 100644 --- a/src/Systems/pitot.cxx +++ b/src/Systems/pitot.cxx @@ -85,4 +85,13 @@ PitotSystem::update (double dt) } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<PitotSystem> registrantPitotSystem( + SGSubsystemMgr::POST_FDM, + {{"static", SGSubsystemMgr::Dependency::SOFT}, + {"vacuum", SGSubsystemMgr::Dependency::SOFT}}); +#endif + // end of pitot.cxx diff --git a/src/Systems/static.cxx b/src/Systems/static.cxx index f8dc2add6..74fa1cb19 100644 --- a/src/Systems/static.cxx +++ b/src/Systems/static.cxx @@ -110,4 +110,12 @@ StaticSystem::update (double dt) } } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<StaticSystem> registrantStaticSystem( + SGSubsystemMgr::GENERAL, + {{"vacuum", SGSubsystemMgr::Dependency::HARD}}); +#endif + // end of static.cxx diff --git a/src/Systems/system_mgr.cxx b/src/Systems/system_mgr.cxx index 7db1bcb33..27694f992 100644 --- a/src/Systems/system_mgr.cxx +++ b/src/Systems/system_mgr.cxx @@ -91,4 +91,9 @@ bool FGSystemMgr::build (SGPropertyNode* config_props) return true; } + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGSystemMgr> registrantFGSystemMgr( + SGSubsystemMgr::FDM); + // end of system_manager.cxx diff --git a/src/Systems/vacuum.cxx b/src/Systems/vacuum.cxx index 9bf84e284..49b479479 100644 --- a/src/Systems/vacuum.cxx +++ b/src/Systems/vacuum.cxx @@ -98,4 +98,10 @@ VacuumSystem::update (double dt) _suction_node->setDoubleValue(suction); } + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<VacuumSystem> registrantVacuumSystem; +#endif + // end of vacuum.cxx diff --git a/src/Time/TimeManager.cxx b/src/Time/TimeManager.cxx index deae53ce8..c00bab291 100644 --- a/src/Time/TimeManager.cxx +++ b/src/Time/TimeManager.cxx @@ -463,3 +463,9 @@ void TimeManager::setTimeOffset(const std::string& offset_type, long int offset) SG_LOG( SG_GENERAL, SG_INFO, "After TimeManager::setTimeOffset(): warp = " << _warp->getIntValue() ); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<TimeManager> registrantTimeManager( + SGSubsystemMgr::INIT, + {{"FDM", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Time/light.cxx b/src/Time/light.cxx index 0df69320d..670056663 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -460,3 +460,8 @@ void FGLight::updateBodyPos(const char *body, double *lon, double *lat, AngleRad->setDoubleValue(*angle); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGLight> registrantFGLight( + SGSubsystemMgr::DISPLAY); diff --git a/src/Traffic/TrafficMgr.cxx b/src/Traffic/TrafficMgr.cxx index c72787726..a021ef880 100644 --- a/src/Traffic/TrafficMgr.cxx +++ b/src/Traffic/TrafficMgr.cxx @@ -936,3 +936,10 @@ void FGTrafficManager::Tokenize(const string& str, pos = str.find_first_of(delimiters, lastPos); } } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGTrafficManager> registrantFGTrafficManager( + SGSubsystemMgr::POST_FDM, + {{"terrasync", SGSubsystemMgr::Dependency::HARD}, + {"PerformanceDB", SGSubsystemMgr::Dependency::HARD}}); diff --git a/src/Viewer/view.cxx b/src/Viewer/view.cxx index 7cb3a1f6b..e2dbc4bb2 100644 --- a/src/Viewer/view.cxx +++ b/src/Viewer/view.cxx @@ -1161,3 +1161,9 @@ SGVec3d View::PositionAttitudeProperties::attitude() const double roll = _rollProp ? _rollProp->getDoubleValue() : 0.0; return SGVec3d(heading, pitch, roll); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<View> registrantView; +#endif diff --git a/src/Viewer/viewmgr.cxx b/src/Viewer/viewmgr.cxx index 3b27a97d8..01ad18ad4 100644 --- a/src/Viewer/viewmgr.cxx +++ b/src/Viewer/viewmgr.cxx @@ -257,3 +257,8 @@ FGViewMgr::setView (int newview) // on FGViewer, so update() is a no-op. update(0.0); } + + +// Register the subsystem. +SGSubsystemMgr::Registrant<FGViewMgr> registrantFGViewMgr( + SGSubsystemMgr::DISPLAY); diff --git a/utils/fgpanel/FGPanel.cxx b/utils/fgpanel/FGPanel.cxx index 45e7f0c1f..b89e18926 100644 --- a/utils/fgpanel/FGPanel.cxx +++ b/utils/fgpanel/FGPanel.cxx @@ -432,3 +432,9 @@ FGPanel::getInitDisplayList () { #endif } } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGPanel> registrantFGPanel; +#endif diff --git a/utils/fgpanel/FGPanelProtocol.cxx b/utils/fgpanel/FGPanelProtocol.cxx index 9c4f970f3..e76ef5f56 100644 --- a/utils/fgpanel/FGPanelProtocol.cxx +++ b/utils/fgpanel/FGPanelProtocol.cxx @@ -177,3 +177,9 @@ void FGPanelProtocol::reinit () { init (); } + + +// Register the subsystem. +#if 0 +SGSubsystemMgr::Registrant<FGPanelProtocol> registrantFGPanelProtocol; +#endif