mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #199 , adjusted context classes
* removed usingLocalObjects() now in CContext * removed getRuntime() now in CContext * Constructors no longer public, context can only be obtained via runtime object * runtime class is friend class
This commit is contained in:
@@ -7,12 +7,12 @@
|
||||
#define BLACKCORE_CONTEXTAPPLICATION_IMPL_H
|
||||
|
||||
#include "context_application.h"
|
||||
#include "coreruntime.h"
|
||||
#include "context_runtime.h"
|
||||
#include "dbus_server.h"
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
class CCoreRuntime;
|
||||
class CRuntime;
|
||||
|
||||
/*!
|
||||
* \brief Application context
|
||||
@@ -24,11 +24,8 @@ namespace BlackCore
|
||||
|
||||
public:
|
||||
|
||||
/*!
|
||||
* Context
|
||||
* \param parent
|
||||
*/
|
||||
CContextApplication(QObject *parent = nullptr);
|
||||
//! Constructor
|
||||
CContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CContextApplication() {}
|
||||
@@ -37,24 +34,7 @@ namespace BlackCore
|
||||
CContextApplication *registerWithDBus(CDBusServer *server)
|
||||
{
|
||||
server->addObject(IContextApplication::ObjectPath(), this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Runtime
|
||||
* \return
|
||||
*/
|
||||
CCoreRuntime *getRuntime()
|
||||
{
|
||||
return static_cast<CCoreRuntime *>(this->parent());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Const runtime
|
||||
* \return
|
||||
*/
|
||||
const CCoreRuntime *getRuntime() const
|
||||
{
|
||||
return static_cast<CCoreRuntime *>(this->parent());
|
||||
return this;
|
||||
}
|
||||
|
||||
public slots:
|
||||
|
||||
Reference in New Issue
Block a user