Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.h
T
torstenandCopilot 7a6be7474e Qt6 migration: Fix BUILD_RTI=OFF build errors in TrainingAreaBase
- training_area_telegrams.cpp: Fixed QJsonObject initializer syntax (Qt6 requires {{}} not ({}))
- training_area_telegrams.cpp: Fixed fromJson() methods to access m_* members directly
- training_area_telegrams.cpp: Fixed brace mismatches in multiple toJson() methods
- training_area_telegrams.h: Changed Header struct to public members for consistency
- tx_mixin.cpp: Fixed getEquipmentNumber() template for direct member access
- lts_coordinate.cpp: Added missing #include <iomanip>
- MIGRATION_STATUS.md: Added migration progress tracking document

C++17 constraint enforced due to RTI Connext DDS 7.7.0 incompatibility with C++20+

Build status: BUILD_RTI=OFF successful (0 errors, warnings only)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-23 20:49:23 +02:00

87 lines
2.7 KiB
C++
Executable File

/**
* Handler for player data
* $Id$
* $HeadURL$
* $Author$
* 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 <AreaEffectSimulation/aes_dtc.h>
#include <AreaEffectSimulation/aes_ftc.h>
#include <ProjectDataManagement/pdm_dtc.h>
#include <QtCore/QObject>
#include <QtCore/QMap>
#include <QtCore/QHash>
#include <QtCore/QVector>
#include <QPolygonF>
#include <QQueue>
#include <QtCore/QHash>
#include <QtCore/QTimer>
namespace LtsUtils
{
class QPoint3D;
}
// AES-Handling for Explosions
namespace CesExplosions
{
//------------------------------------------------------------------------------
// class HandlerVulcano
//------------------------------------------------------------------------------
class HandlerVulcano : public QObject
, protected AreaEffectSimulation::Interface::Ftc::TargetPositionsModifyReplyHandler
{
Q_OBJECT
public:
typedef QHash<int, QSet<int>> BitfieldStates;
explicit HandlerVulcano(const std::shared_ptr<CentralEffectSimulation::DdsHandler> &ddsHandler,
QObject *parent = nullptr);
~HandlerVulcano();
/**
* Initialize the handler to manage information from player management
*/
bool init();
protected:
void onTargetPositionsModifyReply(const Core::FunctionReplyObject &replyObject) override final;
private slots:
void onExplosionClusterChanged(const AreaEffectSimulation::ExplosionCluster &data, DataModification modType);
void onDynamicParticipantChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType);
void onFiringTimeTimeout();
void onTrajectoryTimeAwareTimeout();
private: // functions
// firstTrajectoryTimeAwareFromAesId and getTrajectoryPosFromTime were initially created as AesDtcCustomFunction.
// But since they are very specific, they were moved to this place:
AreaEffectSimulation::TrajectoryTimeAware firstTrajectoryTimeAwareFromAesId(int aesId);
Core::GeoPosition getTrajectoryPosFromTime(int aesId, long long timeParam);
private: // attributes
std::shared_ptr<CentralEffectSimulation::DdsHandler> m_ddsHandler; ///< Pointer to VOM DDS handler
// AES-Values
QHash<int, AreaEffectSimulation::ExplosionCluster> m_explosionCluster; // key = AesId
QHash<int, QTimer *> m_aesTimers; // key = aesId value= VulcanoTimer
CentralEffectSimulation::LOGGER_T &m_logger; ///< Interface to the Logging-Facility
};
} // namespace CesExplosions