mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 02:06:08 +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);
|
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()
|
CContextSimulator *CRuntime::getCContextSimulator()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(!this->m_contextSimulator || this->m_contextSimulator->usingLocalObjects(), "CCoreRuntime", "Cannot downcast to local object");
|
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 CContextApplication;
|
||||||
class CContextAudio;
|
class CContextAudio;
|
||||||
class CContextNetwork;
|
class CContextNetwork;
|
||||||
class ContextOwnAircraft;
|
class CContextOwnAircraft;
|
||||||
class CContextSettings;
|
class CContextSettings;
|
||||||
class CContextSimulator;
|
class CContextSimulator;
|
||||||
class IContextApplication;
|
class IContextApplication;
|
||||||
@@ -168,6 +168,14 @@ namespace BlackCore
|
|||||||
//! \remarks only applicable for local object
|
//! \remarks only applicable for local object
|
||||||
const CContextAudio *getCContextAudio() const;
|
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
|
//! Context for simulator
|
||||||
//! \remarks only applicable for local object
|
//! \remarks only applicable for local object
|
||||||
CContextSimulator *getCContextSimulator();
|
CContextSimulator *getCContextSimulator();
|
||||||
@@ -179,6 +187,7 @@ namespace BlackCore
|
|||||||
//! Init
|
//! Init
|
||||||
void init(const CRuntimeConfig &config);
|
void init(const CRuntimeConfig &config);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_init; /*!< flag */
|
bool m_init; /*!< flag */
|
||||||
CDBusServer *m_dbusServer;
|
CDBusServer *m_dbusServer;
|
||||||
|
|||||||
Reference in New Issue
Block a user