Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.h
T
torstenandCopilot b774f4035c Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-19 06:06:24 +02:00

100 lines
3.5 KiB
C++
Executable File

/**
* Handler for player data
* $Id: handler_functional_area.h 64170 2024-11-25 11:34:11Z fritsche_h $
* $HeadURL: svn://slssvn/TDS/branches/product/features/25_03_etb_uas/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.h $
* $Author: fritsche_h $
* Created by gr, SLSE, 2017-02-20
*/
#pragma once
#include <CentralEffectSimulation/logger.h>
#include <CentralEffectSimulation/dds_handler.h>
#include <CentralEffectSimulation/aes_item_view_utm.h>
#include <CentralEffectSimulation/handler_participant.h>
#include <CentralEffectSimulation/handler_building_data.h>
#include <AreaEffectSimulation/aes_dtc.h>
#include <QtCore/QHash>
#include <QtCore/QObject>
#include <QtCore/QQueue>
#include <QtCore/QPointF>
#include <QtGui/QPolygonF>
// AES-Handling for participants
namespace CES_JAMMING
{
struct ParticipantDistance
{
double squareDistance = 0;
CentralEffectSimulation::HandlerParticipant::CesParticipantData participantPosition;
};
struct EnterLeaveType
{
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
bool isAlreadySupplied = false;
};
class HandlerJamming : public QObject
, protected TrainingAreaBase::Interface::Ftc::SendCesHitReplyHandler
{
Q_OBJECT
public:
explicit HandlerJamming(const std::shared_ptr<CentralEffectSimulation::DdsHandler> &ddsHandler,
const std::shared_ptr<CentralEffectSimulation::HandlerParticipant> &participantHandler,
const std::shared_ptr<CentralEffectSimulation::HandlerBuildingData> &handlerBuildingData,
QObject *parent = nullptr);
~HandlerJamming();
/**
* Initialize the handler to manage information from player management
*/
bool init();
protected:
void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final;
private Q_SLOTS:
/**
* Handle the signals from 'AES'
*/
// void onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType);
// void onJammingChanged(const AreaEffectSimulation::JammingArea &data, DataModification modType);
void onParticipantGearEventChanged(const ParticipantManagement::ParticipantGearEvent &data, DataModification modType);
private: // methoden
void sendCesHitRequest(const int chargeTypeId, const int originatorId,
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData);
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
private: // attributes
std::shared_ptr<CentralEffectSimulation::DdsHandler> m_ddsHandler; ///< Pointer to VOM DDS handler
std::shared_ptr<CentralEffectSimulation::HandlerParticipant> m_handlerParticipant;
std::shared_ptr<CentralEffectSimulation::HandlerBuildingData> m_handlerBuildingData;
QHash<int32_t, int> m_aesItemId2partIdMap;
// AES-Values
QHash<int, CentralEffectSimulation::AesItemViewUtm> m_aesItemViews; // key = aesItemId
QQueue<TrainingAreaBase::SendCesHitRequest> m_sendCesHitRequestQueue;
QQueue<TrainingAreaBase::DemandInitRequest> m_sendInitRequestQueue;
QHash<QPair<int, int>, EnterLeaveType> m_cesEnterLeaveFunctionalArea; // QPair < aesItemId, participantId> Last Event
QHash<int, QVector<int>> m_aesPolygonEncloseBuilding; // key = aesItemId value = BuildingIds inside form
int m_requestId = 1;
};
} // namespace CES_JAMMING