6 #ifndef SWIFT_CORE_CONTEXT_CONTEXT_H
7 #define SWIFT_CORE_CONTEXT_CONTEXT_H
22 class CLogCategoryList;
24 namespace swift::core::context
26 class IContextApplication;
28 class IContextNetwork;
29 class IContextOwnAircraft;
30 class IContextSimulator;
42 static const QStringList &getLogCategories();
59 Q_ASSERT(this->parent());
66 Q_ASSERT(this->parent());
111 void setDebugEnabled(
bool debug);
114 bool isDebugEnabled()
const;
137 return path % u
':' % QString::number(this->getUniqueId());
141 void relayBaseClassSignals(
const QString &serviceName, QDBusConnection &connection,
const QString &objectPath,
142 const QString &interfaceName);
148 .
warning(u
"Empty context called, details: %1")
164 bool m_debugEnabled =
false;
ContextMode
How to handle a given context.
@ NotUsed
during shutdown or not used at all
@ Local
context runs in same process
@ LocalInDBusServer
context runs in same process.
The class providing facades (the contexts) for all DBus relevant operations.
Application context interface.
Base for all context classes.
void changedLogOrDebugSettings()
Log or debug values changed.
const CCoreFacade * getRuntime() const
Const runtime.
CCoreFacade * getRuntime()
Runtime.
QString buildPathAndContextId(const QString &path) const
Path and context id.
void logEmptyContextWarning(const QString &functionName) const
Empty context called.
bool isUsingImplementingObject() const
Using local implementing object?
bool isEmptyObject() const
Empty object?
CCoreFacadeConfig::ContextMode getMode() const
Mode.
virtual void onAboutToShutdown()
Called when shutdown is about to be called.
bool isLocalObject() const
Local or remote object?
virtual bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)=0
Parse a given command line.
virtual QString getPathAndContextId() const =0
Id and path name for round trip protection.
qint64 getUniqueId() const
Unique id.
~IContext()=default
Destructor.
Value object encapsulating information identifying a component of a modular distributed swift process...
static const QString & contextSlot()
Context slots.
Class for emitting a log message.
Derived & warning(const char16_t(&format)[N])
Set the severity to warning, providing a format string.
Streamable status message, e.g.
Free functions in swift::misc.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.