- 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>
111 lines
4.7 KiB
C++
Executable File
111 lines
4.7 KiB
C++
Executable File
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QHash>
|
|
#include <QSet>
|
|
|
|
#include <AreaEffectSimulation/aes_dtc.h>
|
|
#include <AreaEffectSimulation/aes_ftc.h>
|
|
#include <AreaEffectSimulation/Utils/aes_helper.h>
|
|
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
|
|
#include <Common/logger.h>
|
|
#include <Common/typestruct.h>
|
|
|
|
|
|
#define SUPPORT_AES_EFFECTS
|
|
#define SUPPORT_EXPLOSION_CLUSTER_SINGLE_EFFECT
|
|
|
|
|
|
|
|
|
|
|
|
namespace HighLevelArchitecture
|
|
{
|
|
|
|
class NgsHandler;
|
|
struct ParticipantPosition;
|
|
|
|
class AesHandler : public QObject
|
|
, protected AreaEffectSimulation::Interface::Ftc::MineAreaModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::MineAreaRemoveReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::MineCorridorModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::MineCorridorRemoveReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionSingleModifyReplyHandler
|
|
#ifdef SUPPORT_EXPLOSION_CLUSTER_SINGLE_EFFECT
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionClusterSingleEffectOnlyModifyReplyHandler
|
|
#endif
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AesHandler(NgsHandler *ngsHandler);
|
|
|
|
void onMineAreaModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
|
void onMineAreaRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
|
|
void onMineCorridorModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
void onMineCorridorRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
|
|
void onExplosionSingleModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
#ifdef SUPPORT_EXPLOSION_CLUSTER_SINGLE_EFFECT
|
|
void onExplosionClusterSingleEffectOnlyModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
#endif
|
|
|
|
int64_t externalId(int aesItemId) const;
|
|
bool init();
|
|
|
|
private Q_SLOTS:
|
|
void onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType);
|
|
void onTriggeredImpactsChanged(const AreaEffectSimulation::TriggeredImpacts &data, DataModification modType);
|
|
|
|
#ifdef SUPPORT_AES_EFFECTS
|
|
void onEffectsChanged(const AreaEffectSimulation::Effects &data, DataModification modType);
|
|
#endif
|
|
|
|
void onAesExplosionSingleChanged(const AreaEffectSimulation::ExplosionSingle &data, DataModification modType);
|
|
void onAesMineAreaChanged(const AreaEffectSimulation::MineArea &data, DataModification modType);
|
|
void onAesMineCorridorChanged(const AreaEffectSimulation::MineCorridor &data, DataModification modType);
|
|
void onAesNContaminationChanged(const AreaEffectSimulation::NContamination &data, DataModification modType);
|
|
void onAesBCContaminationChanged(const AreaEffectSimulation::BCContamination &data, DataModification modType);
|
|
|
|
void onAesNameChanged(qint64 identifierInt, const std::string &newName);
|
|
void onAesActivationTimeChanged(qint64 identifierInt, qint64 msecsSinceEpoch);
|
|
void onAesForceIdentifierChanged(qint64 identifierInt, int partyId);
|
|
void onAesDurationChanged(qint64 identifierInt, quint32 u_time);
|
|
void onAesChargeChanged(qint64 identifierInt, int chargeTypeId);
|
|
void onAesPointsDataChanged(qint64 identifierInt, const std::vector<Core::GeoPosition2D> &pos);
|
|
void onAesRemoveItem(qint64 identifierInt);
|
|
|
|
bool onNewMinefield(const AreaEffectSimulation::MineAreaModifyRequest &ma);
|
|
bool onNewMinefieldBreach(const AreaEffectSimulation::MineCorridorModifyRequest &mc);
|
|
void onMunitionDetonation(const AreaEffectSimulation::ExplosionSingleModifyRequest &es);
|
|
#ifdef SUPPORT_EXPLOSION_CLUSTER_SINGLE_EFFECT
|
|
void onMunitionDetonationExplosionClusterSingleEffect(const AreaEffectSimulation::ExplosionClusterSingleEffectOnlyRequest &es);
|
|
#endif
|
|
|
|
private:
|
|
template <typename T>
|
|
void onSendRequest(const T &item);
|
|
template <typename T>
|
|
void addRequestToQueue(int aesItemId, T *request);
|
|
|
|
static bool isModifiable(const AreaEffectSimulation::AesItem &item);
|
|
private:
|
|
NgsHandler *m_ngsHandler;
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_dtcAes;
|
|
std::shared_ptr<AreaEffectSimulation::Interface::Ftc> m_ftcAes;
|
|
QMap<int32_t, AreaEffectSimulation::AesItemView> m_aesItemViews;
|
|
QMap<int32_t, QVector<int32_t> > m_takenIndicesForAesItem;
|
|
#ifdef SUPPORT_AES_EFFECTS
|
|
AreaEffectSimulation::HandledImpactsStorage m_handledImpactsStorage;
|
|
#endif
|
|
|
|
QMap<int, void*> m_pendingRequests;
|
|
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
};
|
|
}
|