mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
committed by
Mathew Sutcliffe
parent
0eaab1753d
commit
aafe211b5c
@@ -83,4 +83,18 @@ namespace BlackCore
|
||||
return m_info.toQString();
|
||||
}
|
||||
|
||||
void ISimulatorListener::start()
|
||||
{
|
||||
if (m_isRunning) { return; }
|
||||
m_isRunning = true;
|
||||
startImpl();
|
||||
}
|
||||
|
||||
void ISimulatorListener::stop()
|
||||
{
|
||||
if(!m_isRunning) { return; }
|
||||
stopImpl();
|
||||
m_isRunning = false;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -255,17 +255,25 @@ namespace BlackCore
|
||||
|
||||
public slots:
|
||||
//! Start listening for the simulator to start.
|
||||
virtual void start() = 0;
|
||||
void start();
|
||||
|
||||
//! Stops listening.
|
||||
virtual void stop() = 0;
|
||||
void stop();
|
||||
|
||||
signals:
|
||||
//! Emitted when the listener discovers the simulator running.
|
||||
void simulatorStarted(const BlackMisc::Simulation::CSimulatorPluginInfo &info);
|
||||
|
||||
protected:
|
||||
//! Plugin specific implementation to start listener
|
||||
virtual void startImpl() = 0;
|
||||
|
||||
//! Plugin specific implementation to stop listener
|
||||
virtual void stopImpl() = 0;
|
||||
|
||||
private:
|
||||
BlackMisc::Simulation::CSimulatorPluginInfo m_info;
|
||||
bool m_isRunning = false;
|
||||
};
|
||||
|
||||
//! Factory pattern class to create instances of ISimulator
|
||||
|
||||
Reference in New Issue
Block a user