X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2Fsubsystem_mgr.hxx;h=1919db4b458d1a116a88a4bd2b8b37e9315ac86b;hb=b0063f8db67066c1ad4d9481c33b4627a1c51d3b;hp=a0e76809c8a3522ddff53b49927248442ab21eff;hpb=0a08ee836c817701dc4297d371e3e0a4662d470d;p=simgear.git diff --git a/simgear/structure/subsystem_mgr.hxx b/simgear/structure/subsystem_mgr.hxx index a0e76809..1919db4b 100644 --- a/simgear/structure/subsystem_mgr.hxx +++ b/simgear/structure/subsystem_mgr.hxx @@ -32,7 +32,7 @@ #include #include - +#include class TimingInfo { @@ -150,6 +150,13 @@ public: */ virtual void init (); + typedef enum + { + INIT_DONE, ///< subsystem is fully initialised + INIT_CONTINUE ///< init should be called again + } InitStatus; + + virtual InitStatus incrementalInit (); /** * Initialize parts that depend on other subsystems having been initialized. @@ -289,7 +296,8 @@ public: SGSubsystemGroup (); virtual ~SGSubsystemGroup (); - virtual void init (); + virtual void init(); + virtual InitStatus incrementalInit (); virtual void postinit (); virtual void reinit (); virtual void shutdown (); @@ -313,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; @@ -322,6 +336,9 @@ private: double _fixedUpdateTime; double _updateTimeRemainder; + + /// index of the member we are currently init-ing + unsigned int _initPosition; }; @@ -364,6 +381,7 @@ public: virtual ~SGSubsystemMgr (); virtual void init (); + virtual InitStatus incrementalInit (); virtual void postinit (); virtual void reinit (); virtual void shutdown (); @@ -394,7 +412,8 @@ public: private: SGSubsystemGroup* _groups[MAX_GROUPS]; - + unsigned int _initPosition; + typedef std::map SubsystemDict; SubsystemDict _subsystem_map; };