]> git.mxchange.org Git - simgear.git/commitdiff
Expose the current members of a subsystem group.
authorJames Turner <jmt@Bishop.local>
Fri, 28 Dec 2012 14:54:00 +0000 (14:54 +0000)
committerJames Turner <jmt@Bishop.local>
Fri, 28 Dec 2012 14:54:00 +0000 (14:54 +0000)
simgear/structure/subsystem_mgr.cxx
simgear/structure/subsystem_mgr.hxx

index 2b29d22d3b90236a709fbd91529c97e4068abe7f..1e1425528e1a94f595e7b4de4e088c188b15d9a3 100644 (file)
@@ -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
 {
index 37cd8aad320722bb5dca1b65843905b1b4c5c456..1919db4b458d1a116a88a4bd2b8b37e9315ac86b 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <simgear/timing/timestamp.hxx>
 #include <simgear/structure/SGSharedPtr.hxx>
-
+#include <simgear/misc/strutils.hxx>
 
 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;