From: James Turner Date: Fri, 28 Dec 2012 14:54:00 +0000 (+0000) Subject: Expose the current members of a subsystem group. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ec82a0154bb8adb660417bf89686db731b650ac0;p=simgear.git Expose the current members of a subsystem group. --- diff --git a/simgear/structure/subsystem_mgr.cxx b/simgear/structure/subsystem_mgr.cxx index 2b29d22d..1e142552 100644 --- a/simgear/structure/subsystem_mgr.cxx +++ b/simgear/structure/subsystem_mgr.cxx @@ -281,6 +281,16 @@ SGSubsystemGroup::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 SGSubsystemGroup::is_suspended () const { diff --git a/simgear/structure/subsystem_mgr.hxx b/simgear/structure/subsystem_mgr.hxx index 37cd8aad..1919db4b 100644 --- a/simgear/structure/subsystem_mgr.hxx +++ b/simgear/structure/subsystem_mgr.hxx @@ -32,7 +32,7 @@ #include #include - +#include class TimingInfo { @@ -321,6 +321,12 @@ public: * */ void set_fixed_update_time(double fixed_dt); + + /** + * retrive list of member subsystem names + */ + string_list member_names() const; + private: class Member;