From c06e433e74066a90c5012b52339054a92634e0d6 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 15 Jun 2017 18:30:27 +0100 Subject: [PATCH] Templated lookup of subsystem-group members. --- simgear/structure/subsystem_mgr.hxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/simgear/structure/subsystem_mgr.hxx b/simgear/structure/subsystem_mgr.hxx index 7a07f21c..1142e366 100644 --- a/simgear/structure/subsystem_mgr.hxx +++ b/simgear/structure/subsystem_mgr.hxx @@ -330,6 +330,11 @@ public: */ string_list member_names() const; + template + T* get_subsystem() + { + return dynamic_cast(get_subsystem(T::subsystemName())); + } private: class Member;