Melchior FRANZ:

This is the more elegant solution that Andy had proposed in a response
to my RFC on Nasal initialization code in joystick configuration files.
As Nasal is initialized last (for good reason), subsystem can currently
not use it for initializing. postinit() is called on all subsystems
after all have been initialized.
This commit is contained in:
ehofman
2005-06-11 08:39:26 +00:00
parent d4e760efe1
commit 5d34eb12e0
2 changed files with 33 additions and 0 deletions
+19
View File
@@ -25,6 +25,11 @@ SGSubsystem::init ()
{
}
void
SGSubsystem::postinit ()
{
}
void
SGSubsystem::reinit ()
{
@@ -87,6 +92,13 @@ SGSubsystemGroup::init ()
_members[i]->subsystem->init();
}
void
SGSubsystemGroup::postinit ()
{
for (unsigned int i = 0; i < _members.size(); i++)
_members[i]->subsystem->postinit();
}
void
SGSubsystemGroup::reinit ()
{
@@ -250,6 +262,13 @@ SGSubsystemMgr::init ()
_groups[i].init();
}
void
SGSubsystemMgr::postinit ()
{
for (int i = 0; i < MAX_GROUPS; i++)
_groups[i].postinit();
}
void
SGSubsystemMgr::reinit ()
{