SG_LOG(SG_GENERAL, SG_WARN, "remove_subsystem: missing:" << name);
}
+//------------------------------------------------------------------------------
+void SGSubsystemGroup::clearSubsystems()
+{
+ for( MemberVec::iterator it = _members.begin();
+ it != _members.end();
+ ++it )
+ delete *it;
+ _members.clear();
+}
+
void
SGSubsystemGroup::set_fixed_update_time(double dt)
{
-
// Written by David Megginson, started 2000-12
//
// Copyright (C) 2000 David Megginson, david@megginson.com
typedef void (*SGSubsystemTimingCb)(void* userData, const std::string& name, SampleStatistic* pStatistic);
-\f
/**
* Basic interface for all FlightGear subsystems.
*
};
typedef SGSharedPtr<SGSubsystem> SGSubsystemRef;
-
-\f
+
/**
* A group of FlightGear subsystems.
*/
virtual void remove_subsystem (const std::string &name);
virtual bool has_subsystem (const std::string &name) const;
+ /**
+ * Remove all subsystems.
+ */
+ virtual void clearSubsystems();
+
void reportTiming(void);
/**
unsigned int _initPosition;
};
-
-\f
/**
* Manage subsystems for FlightGear.
*
SubsystemDict _subsystem_map;
};
-
-
#endif // __SUBSYSTEM_MGR_HXX
-