Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.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

64 lines
1.9 KiB
C++
Executable File

/**
* Handler for all meteo data units
* $Id$
* $HeadURL$
* $Author$
* Created by hjl, SLSE, 2016-09-27
*/
#include "handler_meteo_data_units.h"
#include "handler_meteo_data_unit.h"
#include "handler_infrastructure_data.h"
namespace MeteoDataManagement
{
HandlerMeteoDataUnits::HandlerMeteoDataUnits(MainHandler *mainHandler) : m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
} // end of ctor()
//-----------------------------------------------------------------------------
HandlerMeteoDataUnits::~HandlerMeteoDataUnits()
{
qDeleteAll(m_handlerMeteoDataUnitsMap);
} // end of dtor()
//-----------------------------------------------------------------------------
bool HandlerMeteoDataUnits::init()
{
INFO_LOG(m_logger) << "HandlerMeteoDataUnits::init().... Initialisation of MDU's will be started from ISM directly. ";
return true;
} // end of init()
//-----------------------------------------------------------------------------
bool HandlerMeteoDataUnits::addMeteoDataUnit(const InfrastructureManagement::InstrumentationAsset &asset)
{
INFO_LOG(m_logger) << "addMeteoDataUnit: " << asset;
removeMeteoDataUnit(asset); // just to be sure
HandlerMeteoDataUnit *hMDU = new HandlerMeteoDataUnit(m_mainHandler, asset);
m_handlerMeteoDataUnitsMap.insert(asset.id(), hMDU);
return false;
} // end of addMeteoDataUnit()
//-----------------------------------------------------------------------------
bool HandlerMeteoDataUnits::removeMeteoDataUnit(const InfrastructureManagement::InstrumentationAsset &asset)
{
INFO_LOG(m_logger) << "removeMeteoDataUnit: " << asset;
auto it = m_handlerMeteoDataUnitsMap.find(asset.id());
if (it == m_handlerMeteoDataUnitsMap.end())
return false;
delete it.value();
m_handlerMeteoDataUnitsMap.erase(it);
return true;
} // end of removeMeteoDataUnit()
//-----------------------------------------------------------------------------
} // Namespace MeteoDataManagement