1
0
Fork 0

Changes for SimGear subsystem add/remove tracking

Since the subsystem manager tracks group state, it now binds/inits
automatically. This means groups which create subsystems during init
no longer need to manually bind() them.
This commit is contained in:
James Turner 2018-08-11 18:56:56 +02:00
parent f5117109fe
commit 26bc3713b5
4 changed files with 0 additions and 14 deletions

View file

@ -42,7 +42,6 @@ private:
SGSharedPtr<const SGCondition> _condition;
SGPropertyNode_ptr _enable_prop;
std::string * _enable_value;
std::string _name;
bool _enabled;
protected:

View file

@ -78,11 +78,6 @@ void CockpitDisplayManager::init()
SG_LOG(SG_COCKPIT, SG_ALERT, "Failed to load instrumentation system model: "
<< config << ":" << e.getFormattedMessage() );
}
// bind() created instruments before init.
BOOST_FOREACH(std::string s, _displays) {
get_subsystem(s)->bind();
}
SGSubsystemGroup::init();
}

View file

@ -367,7 +367,6 @@ void TerrainSamplerImplementation::init()
void TerrainSamplerImplementation::postinit()
{
SGSubsystemGroup::bind();//
}
void TerrainSamplerImplementation::reinit()

View file

@ -97,13 +97,6 @@ void FGInstrumentMgr::init()
set_subsystem("gps[0]", new GPS(nd, true /* default GPS mode */));
}
// bind() created instruments before init.
for (unsigned int i=0; i<_instruments.size(); ++i) {
const std::string& nm(_instruments[i]);
SGSubsystem* instr = get_subsystem(nm);
instr->bind();
}
SGSubsystemGroup::init();
}