Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+79
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* MainHandler for Messaging
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by hjl, SLSE, 2016-09-21
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ces_plugin_interface.h"
|
||||
#include "handler_participant.h"
|
||||
#include "handler_building_data.h"
|
||||
#include "proxy_building.h"
|
||||
#include "dds_handler.h"
|
||||
|
||||
#include <CentralEffectSimulation/logger.h>
|
||||
#include <CentralEffectSimulation/svccesddscommon_export.h>
|
||||
|
||||
namespace NGLDB
|
||||
{
|
||||
template <typename DB> class DbServiceHandler;
|
||||
}
|
||||
|
||||
namespace LtsPluginManager
|
||||
{
|
||||
struct PluginInstance;
|
||||
}
|
||||
|
||||
|
||||
namespace LtsPluginManager
|
||||
{
|
||||
struct PluginInstance;
|
||||
}
|
||||
|
||||
|
||||
namespace CentralEffectSimulation
|
||||
{
|
||||
|
||||
class SVCCESDDSCOMMON_EXPORT MainHandler : public QObject, public Plugin::DataProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MainHandler(QObject *parent = nullptr);
|
||||
~MainHandler();
|
||||
|
||||
bool init(int domainId, int exerciseId);
|
||||
|
||||
std::shared_ptr<DdsHandler> dds() const { return m_ddsHandler; }
|
||||
std::shared_ptr<DatabaseInterface> db() const { return m_dbHandler->db(); }
|
||||
|
||||
std::shared_ptr<HandlerBuildingData> handlerBuildingData() const { return m_handlerBuildingData; }
|
||||
std::shared_ptr<HandlerParticipant> handlerParticipant() const { return m_handlerParticipant; }
|
||||
|
||||
std::shared_ptr<ProxyBuilding> proxyBuilding() const { return m_proxyBuilding; }
|
||||
|
||||
const std::vector<std::shared_ptr<Plugin::Interface>> &getPluginList() const { return m_interfaces; }
|
||||
|
||||
|
||||
private:
|
||||
bool loadPlugin(const LtsPluginManager::PluginInstance &pi);
|
||||
|
||||
private: // attributes
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
std::shared_ptr<HandlerBuildingData> m_handlerBuildingData;
|
||||
std::shared_ptr<HandlerParticipant> m_handlerParticipant;
|
||||
std::vector<std::shared_ptr<Plugin::Interface>> m_interfaces;
|
||||
|
||||
std::shared_ptr<ProxyBuilding> m_proxyBuilding;
|
||||
|
||||
|
||||
int m_domainId = 0;
|
||||
int m_exerciseId = 0;
|
||||
CentralEffectSimulation::LOGGER_T &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace CentralEffectSimulation
|
||||
Reference in new issue
Block a user