Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.cpp
T
torsten 950d669538 Qt6 Migration: BUILD_RTI guards und CMake fixes
- BUILD_RTI conditional compilation für RTI Connext DDS dependencies
- Namespace fixes in core_dtc.h (Core:: → DDS::Core::)
- CMakeLists.txt: BUILD_RTI option und conditional dependencies
- Handler minelayer: namespace closing mit BUILD_RTI guard
- Build erfolgreich mit BUILD_RTI=OFF validiert

Signed-off-by: Torsten Wierschin <torsten.wierschin@life-maps.com>
2026-08-21 18:37:18 +02:00

55 lines
1.2 KiB
C++
Executable File

/**
* MainHandler for ReportManagement
* $Id$
* $HeadURL$
* $Author$
*/
#include "main_handler.h"
#include "settings.h"
#include "logger.h"
#include <DDS/DDSConnector/dds_connector.h>
#include <DDS/Core/pacemaker.h>
#include <ngldb/db_service_handler.h>
namespace ReportManagement
{
MainHandler::MainHandler(QObject *parent) : QObject(parent)
, m_ddsHandler(nullptr)
, m_dbHandler(nullptr)
, m_dynPartData(nullptr),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
MainHandler::~MainHandler()
{
m_dynPartData = nullptr;
m_ddsHandler = nullptr;
m_dbHandler = nullptr;
}
bool MainHandler::init(int domainId, int exerciseId)
{
// initialize database
m_dbHandler = std::make_shared<DbHandler>();
if (!m_dbHandler->init(exerciseId, Settings::settings()))
return false;
// initialize DDS
m_ddsHandler = std::make_shared<DdsHandler>(domainId, exerciseId);
if (!m_ddsHandler->init(false))
return false;
m_dynPartData = std::make_shared<HandlerDynamicParticipantData>(m_ddsHandler, m_dbHandler->db());
if (!m_dynPartData->init())
return false;
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Running);
return true;
}
} // ReportManagement