Files
qt-migration-legatus/qt5-before/dlbo/Lts/Application/THP/thp_plugin_provider.cpp
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-15 18:20:26 +00:00

106 lines
3.6 KiB
C++

/**
* @RDE_HEADER@
* Plugin Provider for standalone SRP / THP
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Ehrlicher, SLSE, 2016-02-29
*/
#include "thp_plugin_provider.h"
#include <AreaEffectSimulation/aes_dtc.h>
#include <AdvancedSymbology/Data/asb_foreign_interface_impl.h>
#include <Buildings/bld_dtc.h>
#include <CentralEffectSimulation/ces_dtc.h>
#include <GuezIedManagement/gim_dtc.h>
#include <InfrastructureManagement/ism_dtc.h>
#include <InfrastructureManagement/Data/ism_foreign_data_plugin.h>
#include <ParticipantManagement/ppm_dtc.h>
#include <ProjectDataManagement/pdm_dtc.h>
#include <DDS/DDSConnector/dds_connector.h>
#include "thp_situation_filter_interface_impl.h"
namespace THP
{
QString SitMapPluginProvider::toString() const
{
return QString();
}
bool SitMapPluginProvider::init(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
{
m_ddsConnector = ddsConnector;
m_buildingPluginProvider = std::make_shared<BuildingPluginProvider>();
m_aesDtc = AreaEffectSimulation::Interface::Dtc::create(ddsConnector);
m_aesDtc->enableAll();
m_bldDtc = Buildings::Interface::Dtc::create(ddsConnector);
m_bldDtc->enableAll();
m_cesDtc = CentralEffectSimulation::Interface::Dtc::create(ddsConnector);
m_cesDtc->enableAll();
m_gimDtc = GuezIedManagement::Interface::Dtc::create(ddsConnector);
m_gimDtc->enableAll();
// m_ismDtc = InfrastructureManagement::Interface::Dtc::create(ddsConnector);
// m_ismDtc->enableAll();
// m_ismForeign = std::make_shared<InfrastructureManagement::ForeignInterfaceImpl>(m_ismDtc);
m_ppmDtc = ParticipantManagement::Interface::Dtc::create(ddsConnector);
m_ppmDtc->enableAll();
m_pdmDtc = ProjectDataManagement::Interface::Dtc::create(ddsConnector);
m_pdmDtc->enableAll();
// needs m_ppmDtc
m_fltParticipantIfc = std::make_shared<FilterManagement::ThpFilterInterfaceImpl>(m_ppmDtc);
m_fltAesIfc = std::make_shared<FilterManagement::ThpFilterInterfaceImpl>(m_ppmDtc);
m_fltBuildingComponentIfc = std::make_shared<FilterManagement::ThpFilterInterfaceImpl>(m_ppmDtc);
// m_fltParticipantIfc = m_fltAesIfc; // Not sure, lets try
return m_buildingPluginProvider->init(ddsConnector, this);
}
bool BuildingPluginProvider::init(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector,
SitMapPluginProvider *smPluginProvider)
{
Q_ASSERT(smPluginProvider);
m_smPluginProvider = smPluginProvider;
connect(m_smPluginProvider, &SitMapPluginProvider::partitionTimeChanged,
this, &BuildingPluginProvider::partitionTimeChanged);
m_connectionParams.domainId = ddsConnector->getDomainId();
m_connectionParams.partitionId = ddsConnector->getPartitionId();
m_connectionParams.exerciseId = ddsConnector->getPartitionId();
m_connectionParams.tcpConnectionUrl = ddsConnector->getTcpConnectionUrl();
m_asbIfc = std::make_shared<AdvancedSymbology::ForeignInterfaceImpl>(m_smPluginProvider->ppmDtc(),
m_smPluginProvider->aesDtc(),
m_smPluginProvider->gimDtc());
return true;
}
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> SitMapPluginProvider::ismDataIfc() const
{
if (!m_ismForeign)
m_ismForeign = std::make_shared<InfrastructureManagement::ForeignInterfaceImpl>(ismDtc());
return m_ismForeign;
}
std::shared_ptr<InfrastructureManagement::Interface::Dtc> SitMapPluginProvider::ismDtc() const
{
if (!m_ismDtc)
{
m_ismDtc = InfrastructureManagement::Interface::Dtc::create(m_ddsConnector);
m_ismDtc->enableAll();
}
return m_ismDtc;
}
} // namespace THP