Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Application/THP/thp_plugin_provider.h
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

150 lines
8.8 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Plugin Provider for standalone SRP / THP
* $Id$
* $HeadURL$
* $Author$
* Created by Christian Ehrlicher, SLSE, 2016-02-29
*/
#pragma once
#include <SituationMap/AdapterDds/plugin_provider.h>
#include <BuildingViewer/Common/bdv_plugin_provider.h>
#include <AlarmManagement/alm_info_gui_plugin_interface.h>
#include <LtsAppDescriptor/lts_app_descriptor.h>
#include <LtsSession/lts_session_data_dds.h>
#include <QVector>
namespace DDSConnector
{
class DdsConnector;
}
namespace THP
{
class BuildingPluginProvider;
class SitMapPluginProvider final : public SituationMap::PluginProvider
{
Q_OBJECT
public:
using SituationMap::PluginProvider::PluginProvider;
QString toString() const override;
bool init(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector);
void emitPartitionTimeChanged(qint64 curTime) { m_curPartitionTime = curTime; emit partitionTimeChanged(curTime); }
void setExerciseId(int exerciseId) { m_exerciseId = exerciseId; }
int exerciseId() const override { return m_exerciseId; }
bool isSessionValid() const override { return true; }
qint64 partitionTime() const override { return m_curPartitionTime; }
int partitionId() const override { return -1; }
int operatorId() const override { return 42; }
LtsAppDescriptor::App appId() const override { return LtsAppDescriptor::App::ThpSituationReplay; }
bool isVisibleParty(int) const override { return true; }
QString workspaceId() const override { return {}; }
bool isReplayPartition() const override { return false; }
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> aesDtc() const override { return m_aesDtc; }
std::shared_ptr<AreaEffectSimulation::ForeignInfoGuiInterface> aesInfoIfc() const override { return {}; }
std::shared_ptr<AlarmManagement::Interface::Dtc> almDtc() const override { return {}; }
std::shared_ptr<AlarmManagement::Interface::Ftc> almFtc() const override { return {}; }
std::shared_ptr<AlarmManagement::ForeignInfoGuiInterface> almInfoIfc() const override { return {}; }
std::shared_ptr<AssetManagement::Interface::Dtc> asmDtc() const override { return {}; }
std::shared_ptr<AssetManagement::Interface::Ftc> asmFtc() const override { return {}; }
std::shared_ptr<Buildings::Interface::Dtc> bldDtc() const override { return m_bldDtc; }
std::shared_ptr<Buildings::Interface::Ftc> bldFtc() const override { return {}; }
std::shared_ptr<Buildings::ForeignInfoGuiInterface> bldInfoIfc() const override { return {}; }
std::shared_ptr<CentralEffectSimulation::Interface::Dtc> cesDtc() const override { return m_cesDtc; }
std::shared_ptr<ExerciseManagement::Interface::Dtc> exmDtc() const override { return {}; }
std::shared_ptr<ExerciseManagement::Interface::Ftc> exmFtc() const override { return {}; }
std::shared_ptr<FilterManagement::Interface::Dtc> fltDtc() const override { return {}; }
std::shared_ptr<FilterManagement::Interface::Ftc> fltFtc() const override { return {}; }
std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> fltParticipantIfc() const override { return m_fltParticipantIfc; }
std::shared_ptr<FilterManagement::ForeignAesGuiInterface> fltAesIfc() const override { return m_fltAesIfc; }
std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> fltBuildingComponentIfc() const override { return m_fltBuildingComponentIfc; }
std::shared_ptr<GuezIedManagement::Interface::Dtc> gimDtc() const override { return m_gimDtc; }
std::shared_ptr<GuezIedManagement::ForeignGuiInterface> gimIfc() const override { return {}; }
std::shared_ptr<GuezNasat::Interface::Dtc> gnaDtc() const override { return {}; }
std::shared_ptr<GuezNasat::ForeignGuiInterface> gnaIfc() const override { return {}; }
std::shared_ptr<InfrastructureManagement::Interface::Dtc> ismDtc() const override;
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> ismDataIfc() const override;
std::shared_ptr<InfrastructureManagement::ForeignResourceManagementGuiInterface> ismGuiIfc() const override { return {}; }
std::shared_ptr<OperatorManagement::Interface::Dtc> opmDtc() const override { return {}; }
std::shared_ptr<OperatorManagement::Interface::Ftc> opmFtc() const override { return {}; }
std::shared_ptr<ParticipantManagement::Interface::Dtc> ppmDtc() const override { return m_ppmDtc; }
std::shared_ptr<ParticipantManagement::Interface::Ftc> ppmFtc() const override { return {}; }
std::shared_ptr<ParticipantManagement::ForeignParticipantInfoGuiInterface> ppmParticipantInfoIfc() const override { return {}; }
std::shared_ptr<ProjectDataManagement::Interface::Dtc> pdmDtc() const override { return m_pdmDtc; }
std::shared_ptr<SituationReplay::Interface::Dtc> srpDtc() const override { return m_srpDtc; }
std::shared_ptr<OcSituationClient::ForeignParticipantInfoGuiInterface> ocParticipantInfoIfc() const override { return {}; }
std::shared_ptr<ServiceMonitor::ForeignGuiInterface> smoServiceMonitorIfc() const override { return {}; }
std::shared_ptr<TargetManagement::Interface::Dtc> tgtDtc() const override { return {}; }
std::shared_ptr<ComponentMonitor::Interface::Dtc> cmoDtc() const override { return {}; }
// for BuildingPluginProvider
BuildingPluginProvider *buildingPluginProvider() { return m_buildingPluginProvider.get(); }
private:
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
std::shared_ptr<Buildings::Interface::Dtc> m_bldDtc;
std::shared_ptr<CentralEffectSimulation::Interface::Dtc> m_cesDtc;
std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> m_fltParticipantIfc;
std::shared_ptr<FilterManagement::ForeignAesGuiInterface> m_fltAesIfc;
std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> m_fltBuildingComponentIfc;
std::shared_ptr<GuezIedManagement::Interface::Dtc> m_gimDtc;
mutable std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
mutable std::shared_ptr<InfrastructureManagement::ForeignDataInterface> m_ismForeign;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
std::shared_ptr<SituationReplay::Interface::Dtc> m_srpDtc;
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
qint64 m_curPartitionTime = 0;
int m_exerciseId = 0;
std::shared_ptr<BuildingPluginProvider> m_buildingPluginProvider;
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
};
class BuildingPluginProvider final : public BuildingViewer::PluginProvider
{
Q_OBJECT
public:
using BuildingViewer::PluginProvider::PluginProvider;
BuildingPluginProvider() = default;
QString toString() const override { return m_smPluginProvider->toString(); }
bool init(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector,
SitMapPluginProvider *smPluginProvider);
void emitPartitionTimeChanged(qint64 curTime) { m_smPluginProvider->emitPartitionTimeChanged(curTime); }
int exerciseId() const override { return m_smPluginProvider->exerciseId(); }
qint64 partitionTime() const override { return m_smPluginProvider->partitionTime(); }
bool isReplayPartition() const override { return false; }
bool isVisibleParty(int partyId) const override { return m_smPluginProvider->isVisibleParty(partyId); }
LtsSession::DdsConnectionParams connParams() const override { return m_connectionParams; }
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> asbIfc() const override { return m_asbIfc; }
std::shared_ptr<AudioVideoManagement::ForeignDataInterface> avmDataIfc() const override { return nullptr; } // optional
std::shared_ptr<Buildings::Interface::Dtc> bldDtc() const override { return m_smPluginProvider->bldDtc(); }
std::shared_ptr<Buildings::ForeignInfoGuiInterface> bldInfoIfc() const override { return m_smPluginProvider->bldInfoIfc(); } // optional
std::shared_ptr<InfrastructureManagement::Interface::Dtc> ismDtc() const override { return m_smPluginProvider->ismDtc(); }
std::shared_ptr<InfrastructureManagement::ForeignDataInterface> ismDataIfc() const override { return m_smPluginProvider->ismDataIfc(); }
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> aesDtc() const override { return m_smPluginProvider->aesDtc(); } // optional
std::shared_ptr<ParticipantManagement::Interface::Dtc> ppmDtc() const override { return m_smPluginProvider->ppmDtc(); } // optional
std::shared_ptr<ProjectDataManagement::Interface::Dtc> pdmDtc() const override { return m_smPluginProvider->pdmDtc(); } // optional
std::shared_ptr<SituationReplay::Interface::Dtc> srpDtc() const override { return m_smPluginProvider->srpDtc(); } // optional
std::shared_ptr<ParticipantManagement::ForeignParticipantInfoGuiInterface> ppmParticipantInfoIfc() const override { return m_smPluginProvider->ppmParticipantInfoIfc(); } // optional
private:
SitMapPluginProvider *m_smPluginProvider{nullptr};
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbIfc;
LtsSession::DdsConnectionParams m_connectionParams;
};
}