-
-/**
- * Built-in command: reinitialize one or more subsystems.
- *
- * subsystem[*]: the name(s) of the subsystem(s) to reinitialize; if
- * none is specified, reinitialize all of them.
- */
-static bool
-do_reinit (const SGPropertyNode * arg)
-{
- bool result = true;
-
- vector<SGPropertyNode_ptr> subsystems = arg->getChildren("subsystem");
- if (subsystems.size() == 0) {
- globals->get_subsystem_mgr()->reinit();
- } else {
- for ( unsigned int i = 0; i < subsystems.size(); i++ ) {
- const char * name = subsystems[i]->getStringValue();
- SGSubsystem * subsystem = globals->get_subsystem(name);
- if (subsystem == 0) {
- result = false;
- SG_LOG( SG_GENERAL, SG_ALERT,
- "Subsystem " << name << " not found" );
- } else {
- subsystem->reinit();
- }
- }
- }
-
- globals->get_event_mgr()->reinit();
-
- return result;
-}
-
-#if 0
- //
- // these routines look useful ??? but are never used in the code ???
- //
-
-/**
- * Built-in command: suspend one or more subsystems.
- *
- * subsystem[*] - the name(s) of the subsystem(s) to suspend.
- */
-static bool
-do_suspend (const SGPropertyNode * arg)
-{
- bool result = true;
-
- vector<SGPropertyNode_ptr> subsystems = arg->getChildren("subsystem");
- for ( unsigned int i = 0; i < subsystems.size(); i++ ) {
- const char * name = subsystems[i]->getStringValue();
- SGSubsystem * subsystem = globals->get_subsystem(name);
- if (subsystem == 0) {
- result = false;
- SG_LOG(SG_GENERAL, SG_ALERT, "Subsystem " << name << " not found");
- } else {
- subsystem->suspend();
- }
- }
- return result;
-}
-
-/**
- * Built-in command: suspend one or more subsystems.
- *
- * subsystem[*] - the name(s) of the subsystem(s) to suspend.
- */
-static bool
-do_resume (const SGPropertyNode * arg)
-{
- bool result = true;
-
- vector<SGPropertyNode_ptr> subsystems = arg->getChildren("subsystem");
- for ( unsigned int i = 0; i < subsystems.size(); i++ ) {
- const char * name = subsystems[i]->getStringValue();
- SGSubsystem * subsystem = globals->get_subsystem(name);
- if (subsystem == 0) {
- result = false;
- SG_LOG(SG_GENERAL, SG_ALERT, "Subsystem " << name << " not found");
- } else {
- subsystem->resume();
- }
- }
- return result;
-}
-
-#endif
-