Converts accessor calls to plain member access in bld, cmo, gna, hla, whg and wls.
50 lines
1.4 KiB
C++
Executable File
50 lines
1.4 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QtCore/QHash>
|
|
#include <QtCore/QObject>
|
|
#include <AreaEffectSimulation/aes_ftc.h>
|
|
#include <ProjectDataManagement/pdm.hpp>
|
|
#include "guez_nasat_telegrams.h"
|
|
#include "logger.h"
|
|
|
|
namespace GuezNasat
|
|
{
|
|
class Initialization;
|
|
class HandlerNasatImpact final : public QObject
|
|
, protected AreaEffectSimulation::Interface::Ftc::AirSupportImpactModifyReplyHandler
|
|
, protected AreaEffectSimulation::Interface::Ftc::ExplosionClusterModifyReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit HandlerNasatImpact(Initialization *mainHandler);
|
|
|
|
bool init() const { return true; }
|
|
|
|
void onAirSupportImpactModifyReply(const Core::FunctionReplyObject &reply) override;
|
|
void onExplosionClusterModifyReply(const Core::FunctionReplyObject &reply) override;
|
|
public Q_SLOTS:
|
|
void nasatWeaponRelease(const GuezNasat::NasatWeaponRelease &weaponRelease);
|
|
void nasatImpact(int nasatId, const Core::GeoPosition &pos, qint64 flightTimeMsec, qint64 impactTimeMsec, int munitionCode, FuseType fuseType = FuseType::Instant);
|
|
void onChargeTypeChanged(const ProjectDataManagement::ChargeType &ct);
|
|
private:
|
|
int chargeTypeFromMunitionCode(int nasatChargeCode) const;
|
|
int fuseTypeToPdmIgniterType(FuseType fusetype) const;
|
|
private:
|
|
NGL::INGLLogger &m_logger;
|
|
Initialization *m_mainHandler;
|
|
QHash<int, int> m_chargeMapping;
|
|
#ifdef NLDEVCTRL_844
|
|
struct ForTesting
|
|
{
|
|
int requestCounter{0};
|
|
int replyCounter{0};
|
|
};
|
|
ForTesting testing;
|
|
#endif
|
|
|
|
};
|
|
}
|