// subsystem includes
#include <Aircraft/controls.hxx>
-#include <simgear/misc/interpolator.hxx>
#include <Main/fg_props.hxx>
+#include <Main/FGInterpolator.hxx>
#include <Main/fg_io.hxx>
#include <FDM/fdm_shell.hxx>
#include <Environment/environment_mgr.hxx>
#include <Autopilot/route_mgr.hxx>
#include <Autopilot/autopilotgroup.hxx>
#include <Traffic/TrafficMgr.hxx>
+#include <Network/HTTPClient.hxx>
+#include <Cockpit/cockpitDisplayManager.hxx>
+#include <GUI/new_gui.hxx>
+#include <Main/logger.hxx>
+#include <ATCDCL/ATISmgr.hxx>
+#include <ATC/atc_mgr.hxx>
+#include <AIModel/AIManager.hxx>
+#include <MultiPlayer/multiplaymgr.hxx>
+#include <AIModel/submodel.hxx>
+#include <Aircraft/controls.hxx>
+#include <Input/input.hxx>
+#include <Aircraft/replay.hxx>
+#include <Sound/voice.hxx>
+#include <Canvas/canvas_mgr.hxx>
+#include <Canvas/gui_mgr.hxx>
+#include <Time/light.hxx>
+#include <Viewer/viewmgr.hxx>
+#include <Model/modelmgr.hxx>
using std::vector;
MAKE_SUB(FGControls, "controls");
MAKE_SUB(FGSoundManager, "sound");
- MAKE_SUB(SGInterpolator, "interpolator");
+ MAKE_SUB(FGInterpolator, "prop-interpolator")
MAKE_SUB(FGProperties, "properties");
MAKE_SUB(FDMShell, "fdm");
MAKE_SUB(FGEnvironmentMgr, "environment");
MAKE_SUB(FGSystemMgr, "aircraft-systems");
MAKE_SUB(FGInstrumentMgr, "instruments");
MAKE_SUB(HUD, "hud");
+ MAKE_SUB(flightgear::CockpitDisplayManager, "cockpit-displays");
MAKE_SUB(FGIO, "io");
+ MAKE_SUB(FGHTTPClient, "http");
MAKE_SUB(FGRouteMgr, "route-manager");
-
+ MAKE_SUB(FGLogger, "logger");
+ MAKE_SUB(NewGUI, "gui");
+ MAKE_SUB(FGATISMgr, "atis");
+ MAKE_SUB(FGATCManager, "atc");
+ MAKE_SUB(FGMultiplayMgr, "mp");
MAKE_SUB(FGTrafficManager, "traffic-manager");
-
+ MAKE_SUB(FGAIManager, "ai-manager");
+ MAKE_SUB(FGSubmodelMgr, "submodel-manager");
+ MAKE_SUB(FGControls, "controls");
+ MAKE_SUB(FGInput, "input");
+ MAKE_SUB(FGReplay, "replay");
+ MAKE_SUB(FGVoiceMgr, "voice");
+ MAKE_SUB(FGLight, "lighting");
+ MAKE_SUB(CanvasMgr, "canvas");
+ MAKE_SUB(GUIMgr, "canvas-gui");
+ MAKE_SUB(FGViewMgr, "view-manager");
+ MAKE_SUB(FGModelMgr, "model-manager");
#undef MAKE_SUB
throw sg_range_exception("unknown subsystem:" + name);
{
std::string subsystem(arg->getStringValue("subsystem"));
std::string name = arg->getStringValue("name");
- if (subsystem.empty() || name.empty()) {
+ if (subsystem.empty()) {
SG_LOG(SG_GENERAL, SG_ALERT, "do_add_subsystem:"
<< "no subsystem/name supplied");
return false;
}
+
+ if (name.empty()) {
+ // default name is simply the subsytem's name
+ name = subsystem;
+ }
+
if (globals->get_subsystem_mgr()->get_subsystem(name)) {
SG_LOG(SG_GENERAL, SG_ALERT, "do_add_subsystem:"
<< "duplicate subsystem name:" << name);
bool result = true;
vector<SGPropertyNode_ptr> subsystems = arg->getChildren("subsystem");
- if (subsystems.size() == 0) {
+ if (subsystems.empty()) {
globals->get_subsystem_mgr()->reinit();
} else {
for ( unsigned int i = 0; i < subsystems.size(); i++ ) {