- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes 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 <LtsUtils/LtsUtilsGui/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;
|
|
};
|
|
}
|