Files
qt5-legatus-legacy/Lts/Services/AlarmManagement/initialization.h
T
2026-08-13 18:33:10 +02:00

58 lines
1.6 KiB
C++
Executable File

/**
* MainHandler for Messaging
* $Id$
* $HeadURL$
* $Author$
* Created by hjl, SLSE, 2016-09-21
*/
#pragma once
#include <memory>
#include <AlarmManagement/alm_db.h>
#include <ngldb/db_service_handler.h>
#include "dds_handler.h"
#include "logger.h"
namespace DDSConnector
{
class DdsConnector;
}
namespace NGLDB
{
template <typename DB> class DbServiceHandler;
}
namespace AlarmManagement
{
using DbHandler = NGLDB::DbServiceHandler<DatabaseInterface>;
class DdsHandler;
class HandlerConfigureAlarms;
class HandlerEmergencyCall;
class HandlerParticipant;
class ALM_SERVER_EXPORT Initialization
{
public:
Initialization();
~Initialization();
bool initialize(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector, const QSqlDatabase &sqlDb);
bool loadFromDatabase();
std::shared_ptr<DdsHandler> dds() const { return m_ddsHandler; }
std::shared_ptr<DatabaseInterface> db() const;
std::shared_ptr<HandlerParticipant> hdlParticipant() const { return m_handlerParticipant; }
private: // attributes
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<DbHandler> m_dbHandler; ///< Pointer to DB handler
std::shared_ptr<HandlerConfigureAlarms> m_handlerConfigureAlarms;
std::shared_ptr<HandlerParticipant> m_handlerParticipant; ///< Pointer to handler for all participants
std::shared_ptr<HandlerEmergencyCall> m_handlerEmergencyCall;
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
};
} // namespace MessagingDataManagement