Files
qt5-legatus-legacy/Lts/Plugins/SituationMapPlugin/Gui/SituationMap/plugin_provider_lts_session.h
T
2026-08-13 18:33:10 +02:00

147 lines
9.7 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Provide access to Plugins via LtsSession
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <AdapterDds/plugin_provider.h>
#include <LtsSession/lts_session.h>
#include <LtsSession/lts_session_manager.h>
#include <LtsSession/lts_session_data.h>
#include <QPointer>
#include <AreaEffectSimulation/aes_data_plugin_interface.h>
#include <AreaEffectSimulation/aes_info_gui_plugin_interface.h>
#include <AlarmManagement/alm_data_plugin_interface.h>
#include <AlarmManagement/alm_info_gui_plugin_interface.h>
#include <AssetManagement/asm_data_plugin_interface.h>
#include <Buildings/bld_data_plugin_interface.h>
#include <Buildings/bld_info_gui_plugin_interface.h>
#include <CentralEffectSimulation/ces_data_plugin_interface.h>
#include <FilterManagement/flt_data_plugin_interface.h>
#include <FilterManagement/flt_participant_plugin_interface.h>
#include <FilterManagement/flt_aes_plugin_interface.h>
#include <FilterManagement/flt_building_cmpnt_plugin_interface.h>
#include <GuezIedManagement/gim_data_plugin_interface.h>
#include <GuezIedManagement/gim_info_gui_plugin_interface.h>
#include <GuezNasat/gna_data_plugin_interface.h>
#include <SituationReplay/srp_data_plugin_interface.h>
#include <GuezNasat/gna_gui_plugin_interface.h>
#include <InfrastructureManagement/ism_data_plugin_interface.h>
#include <InfrastructureManagement/ism_resource_management_gui_plugin_interface.h>
#include <OperatorManagement/opm_data_plugin_interface.h>
#include <ParticipantManagement/ppm_data_plugin_interface.h>
#include <ParticipantManagement/ppm_participant_info_gui_plugin_interface.h>
#include <ProjectDataManagement/pdm_data_plugin_interface.h>
#include <OcSituationClient/osc_participant_info_gui_plugin_interface.h>
#include <ServiceMonitor/smo_monitors_gui_plugin_interface.h>
#include <ExerciseManagement/exm_data_plugin_interface.h>
#include <TargetManagement/tgt_data_plugin_interface.h>
#include <ComponentMonitor/cmo_data_plugin_interface.h>
namespace SituationMap
{
class PluginProviderLtsSession final : public PluginProvider
{
Q_OBJECT
public:
explicit PluginProviderLtsSession(const QPointer<LtsSession::LtsSession> &session);
QString toString() const override;
bool init(NGL::INGLLogger &logger);
int exerciseId() const override { return m_session ? m_session->exerciseId() : -1; }
bool isSessionValid() const override { return !m_session.isNull(); }
qint64 partitionTime() const override { return m_session ? m_session->partitionTime() : 0; }
int partitionId() const override { return m_session ? m_session->partitionId() : -1; }
int operatorId() const override { return LtsSessionData::LtsSessionData::getInstance()->getOperatorId(); }
LtsAppDescriptor::App appId() const override { return m_session ? m_session->app() : LtsAppDescriptor::App::Situation; }
bool isVisibleParty(int partyId) const override { return LtsSessionData::LtsSessionData::getInstance()->isVisibleParty(exerciseId(), partyId); }
QString workspaceId() const override { return m_session ? m_session->workspaceId() : QString(); }
bool isReplayPartition() const override { return m_session ? m_session->isReplayPartition() : false; }
virtual std::shared_ptr<AreaEffectSimulation::Interface::Dtc> aesDtc() const override { return m_aesDtc; }
virtual std::shared_ptr<AreaEffectSimulation::ForeignInfoGuiInterface> aesInfoIfc() const override { return m_aesInfoIfc; }
virtual std::shared_ptr<AlarmManagement::Interface::Dtc> almDtc() const override { return m_almDtc; }
virtual std::shared_ptr<AlarmManagement::Interface::Ftc> almFtc() const override { return m_almFtc; }
virtual std::shared_ptr<AlarmManagement::ForeignInfoGuiInterface> almInfoIfc() const override { return m_almInfoIfc; }
virtual std::shared_ptr<AssetManagement::Interface::Dtc> asmDtc() const override { return m_asmDtc; }
virtual std::shared_ptr<AssetManagement::Interface::Ftc> asmFtc() const override { return m_asmFtc; }
virtual std::shared_ptr<Buildings::Interface::Dtc> bldDtc() const override { return m_bldDtc; }
virtual std::shared_ptr<Buildings::Interface::Ftc> bldFtc() const override { return m_bldFtc; }
virtual std::shared_ptr<Buildings::ForeignInfoGuiInterface> bldInfoIfc() const override { return m_bldInfoIfc; }
virtual std::shared_ptr<CentralEffectSimulation::Interface::Dtc> cesDtc() const override { return m_cesDtc; }
virtual std::shared_ptr<ExerciseManagement::Interface::Dtc> exmDtc() const override { return m_exmDtc; }
virtual std::shared_ptr<ExerciseManagement::Interface::Ftc> exmFtc() const override { return m_exmFtc; }
virtual std::shared_ptr<FilterManagement::Interface::Dtc> fltDtc() const override { return m_fltDtc; }
virtual std::shared_ptr<FilterManagement::Interface::Ftc> fltFtc() const override { return m_fltFtc; }
virtual std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> fltParticipantIfc() const override { return m_fltParticipantIfc; }
virtual std::shared_ptr<FilterManagement::ForeignAesGuiInterface> fltAesIfc() const override { return m_fltAesIfc; }
virtual std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> fltBuildingComponentIfc() const override { return m_fltBuildingComponentIfc; }
virtual std::shared_ptr<GuezIedManagement::Interface::Dtc> gimDtc() const override { return m_gimDtc; }
virtual std::shared_ptr<GuezIedManagement::ForeignGuiInterface> gimIfc() const override { return m_gimIfc; }
virtual std::shared_ptr<GuezNasat::Interface::Dtc> gnaDtc() const override { return m_gnaDtc; }
virtual std::shared_ptr<GuezNasat::ForeignGuiInterface> gnaIfc() const override { return m_gnaIfc; }
virtual std::shared_ptr<InfrastructureManagement::Interface::Dtc> ismDtc() const override;
virtual std::shared_ptr<InfrastructureManagement::ForeignDataInterface> ismDataIfc() const override;
virtual std::shared_ptr<InfrastructureManagement::ForeignResourceManagementGuiInterface> ismGuiIfc() const override { return m_ismGuiIfc; }
virtual std::shared_ptr<OperatorManagement::Interface::Dtc> opmDtc() const override { return m_opmDtc; }
virtual std::shared_ptr<OperatorManagement::Interface::Ftc> opmFtc() const override { return m_opmFtc; }
virtual std::shared_ptr<ParticipantManagement::Interface::Dtc> ppmDtc() const override { return m_ppmDtc; }
virtual std::shared_ptr<SituationReplay::Interface::Dtc> srpDtc() const override { return m_srpDtc; }
virtual std::shared_ptr<ParticipantManagement::Interface::Ftc> ppmFtc() const override { return m_ppmFtc; }
virtual std::shared_ptr<ParticipantManagement::ForeignParticipantInfoGuiInterface> ppmParticipantInfoIfc() const override { return m_ppmParticipantInfoIfc; }
virtual std::shared_ptr<ProjectDataManagement::Interface::Dtc> pdmDtc() const override { return m_pdmDtc; }
virtual std::shared_ptr<OcSituationClient::ForeignParticipantInfoGuiInterface> ocParticipantInfoIfc() const override { return m_ocParticipantInfoIfc; }
virtual std::shared_ptr<ServiceMonitor::ForeignGuiInterface> smoServiceMonitorIfc() const override { return m_smoServiceMonitorIfc; }
virtual std::shared_ptr<TargetManagement::Interface::Dtc> tgtDtc() const override { return m_tgtDtc; }
virtual std::shared_ptr<ComponentMonitor::Interface::Dtc> cmoDtc() const override { return m_cmoDtc; }
private:
QPointer<LtsSession::LtsSession> m_session;
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_aesDtc;
std::shared_ptr<AreaEffectSimulation::ForeignInfoGuiInterface> m_aesInfoIfc;
std::shared_ptr<AlarmManagement::Interface::Dtc> m_almDtc;
std::shared_ptr<AlarmManagement::Interface::Ftc> m_almFtc;
std::shared_ptr<AlarmManagement::ForeignInfoGuiInterface> m_almInfoIfc;
std::shared_ptr<AssetManagement::Interface::Dtc> m_asmDtc;
std::shared_ptr<AssetManagement::Interface::Ftc> m_asmFtc;
std::shared_ptr<Buildings::Interface::Dtc> m_bldDtc;
std::shared_ptr<Buildings::Interface::Ftc> m_bldFtc;
std::shared_ptr<Buildings::ForeignInfoGuiInterface> m_bldInfoIfc;
std::shared_ptr<CentralEffectSimulation::Interface::Dtc> m_cesDtc;
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
std::shared_ptr<ExerciseManagement::Interface::Ftc> m_exmFtc;
std::shared_ptr<FilterManagement::Interface::Dtc> m_fltDtc;
std::shared_ptr<FilterManagement::Interface::Ftc> m_fltFtc;
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;
std::shared_ptr<GuezIedManagement::ForeignGuiInterface> m_gimIfc;
std::shared_ptr<GuezNasat::Interface::Dtc> m_gnaDtc;
std::shared_ptr<GuezNasat::ForeignGuiInterface> m_gnaIfc;
mutable std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
mutable std::shared_ptr<InfrastructureManagement::ForeignDataInterface> m_ismDataIfc;
std::shared_ptr<InfrastructureManagement::ForeignResourceManagementGuiInterface> m_ismGuiIfc;
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
std::shared_ptr<OperatorManagement::Interface::Ftc> m_opmFtc;
std::shared_ptr<SituationReplay::Interface::Dtc> m_srpDtc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ppmFtc;
std::shared_ptr<ParticipantManagement::ForeignParticipantInfoGuiInterface> m_ppmParticipantInfoIfc;
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
std::shared_ptr<OcSituationClient::ForeignParticipantInfoGuiInterface> m_ocParticipantInfoIfc;
std::shared_ptr<ServiceMonitor::ForeignGuiInterface> m_smoServiceMonitorIfc;
std::shared_ptr<TargetManagement::Interface::Dtc> m_tgtDtc;
std::shared_ptr<ComponentMonitor::Interface::Dtc> m_cmoDtc;
};
} // namespace SituationMap