mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
refs #242, context object from runtime
This commit is contained in:
@@ -565,6 +565,18 @@ namespace BlackCore
|
||||
return static_cast<CContextApplication *>(this->m_contextApplication);
|
||||
}
|
||||
|
||||
CContextOwnAircraft *CRuntime::getCContextOwnAircraft()
|
||||
{
|
||||
Q_ASSERT_X(!this->m_contextOwnAircraft || this->m_contextOwnAircraft->usingLocalObjects(), "CCoreRuntime", "Cannot downcast to local object");
|
||||
return static_cast<CContextOwnAircraft *>(this->m_contextOwnAircraft);
|
||||
}
|
||||
|
||||
const CContextOwnAircraft *CRuntime::getCContextOwnAircraft() const
|
||||
{
|
||||
Q_ASSERT_X(!this->m_contextOwnAircraft || this->m_contextOwnAircraft->usingLocalObjects(), "CCoreRuntime", "Cannot downcast to local object");
|
||||
return static_cast<CContextOwnAircraft *>(this->m_contextOwnAircraft);
|
||||
}
|
||||
|
||||
CContextSimulator *CRuntime::getCContextSimulator()
|
||||
{
|
||||
Q_ASSERT_X(!this->m_contextSimulator || this->m_contextSimulator->usingLocalObjects(), "CCoreRuntime", "Cannot downcast to local object");
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace BlackCore
|
||||
class CContextApplication;
|
||||
class CContextAudio;
|
||||
class CContextNetwork;
|
||||
class ContextOwnAircraft;
|
||||
class CContextOwnAircraft;
|
||||
class CContextSettings;
|
||||
class CContextSimulator;
|
||||
class IContextApplication;
|
||||
@@ -168,6 +168,14 @@ namespace BlackCore
|
||||
//! \remarks only applicable for local object
|
||||
const CContextAudio *getCContextAudio() const;
|
||||
|
||||
//! Context for own aircraft
|
||||
//! \remarks only applicable for local object
|
||||
CContextOwnAircraft *getCContextOwnAircraft();
|
||||
|
||||
//! Context for own aircraft
|
||||
//! \remarks only applicable for local object
|
||||
const CContextOwnAircraft *getCContextOwnAircraft() const;
|
||||
|
||||
//! Context for simulator
|
||||
//! \remarks only applicable for local object
|
||||
CContextSimulator *getCContextSimulator();
|
||||
@@ -179,6 +187,7 @@ namespace BlackCore
|
||||
//! Init
|
||||
void init(const CRuntimeConfig &config);
|
||||
|
||||
|
||||
private:
|
||||
bool m_init; /*!< flag */
|
||||
CDBusServer *m_dbusServer;
|
||||
|
||||
Reference in New Issue
Block a user