Expose the current members of a subsystem group.

This commit is contained in:
James Turner 2012-12-28 14:54:00 +00:00
parent 0ea8dbea10
commit ec82a0154b
2 changed files with 17 additions and 1 deletions

View File

@ -281,6 +281,16 @@ SGSubsystemGroup::resume ()
_members[i]->subsystem->resume(); _members[i]->subsystem->resume();
} }
string_list
SGSubsystemGroup::member_names() const
{
string_list result;
for (unsigned int i = 0; i < _members.size(); i++)
result.push_back( _members[i]->name );
return result;
}
bool bool
SGSubsystemGroup::is_suspended () const SGSubsystemGroup::is_suspended () const
{ {

View File

@ -32,7 +32,7 @@
#include <simgear/timing/timestamp.hxx> #include <simgear/timing/timestamp.hxx>
#include <simgear/structure/SGSharedPtr.hxx> #include <simgear/structure/SGSharedPtr.hxx>
#include <simgear/misc/strutils.hxx>
class TimingInfo class TimingInfo
{ {
@ -321,6 +321,12 @@ public:
* *
*/ */
void set_fixed_update_time(double fixed_dt); void set_fixed_update_time(double fixed_dt);
/**
* retrive list of member subsystem names
*/
string_list member_names() const;
private: private:
class Member; class Member;