Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+68
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* Convert internal gear and charge id to and from tas ids
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-04-14
|
||||
*/
|
||||
#pragma once
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <QMap>
|
||||
#include <QHash>
|
||||
#include "aes.hpp"
|
||||
#include "logger.h"
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
class MainHandler;
|
||||
|
||||
class PdmHandler
|
||||
{
|
||||
|
||||
public:
|
||||
explicit PdmHandler(MainHandler *mainHandler);
|
||||
|
||||
bool init();
|
||||
|
||||
std::shared_ptr<ProjectDataManagement::Interface::Dtc> dtc() const { return m_dtcPdm; } // for customfunction use only
|
||||
|
||||
ProjectDataManagement::ChargeType chargeTypeFromId(int chargeTypeId);
|
||||
// ProjectDataManagement::ChargeType chargeTypeFromChargeTasCode(int chargeTasCode, bool directCharge);
|
||||
ProjectDataManagement::GearClass gearClassFromChargeTypeId(int chargeTypeId);
|
||||
ProjectDataManagement::RadioGroup radioGroup(int radioGroupId);
|
||||
ProjectDataManagement::BuildingChargeEffect buildingChargeEffect(int chargeTypeId);
|
||||
int vulnerabilityKindId(int tasVulnerabilityKindId, int equipmentNumber);
|
||||
QMap<int, ProjectDataManagement::RadioGroup> radioGroups ();
|
||||
|
||||
int chargeTypeIdFromGearAndChargeTasCode(int gearTasCode, int chargeTasCode);
|
||||
int gearTypeIdFromTasGearTasCode(int gearTasCode);
|
||||
int legacyChargeTypeIgniterType(int chargeTypeId, int igniterTypeId, int igniterFunctionId);
|
||||
|
||||
double impactRadius(const AreaEffectSimulation::ChargeStruct &chargeStruct) const;
|
||||
double impactEdgeLength(const AreaEffectSimulation::ChargeStruct &chargeStruct) const;
|
||||
bool isSmartChargeType(const AreaEffectSimulation::ChargeStruct &chargeStruct) const;
|
||||
bool isIedChargeType(const AreaEffectSimulation::ChargeStruct &chargeStruct) const;
|
||||
bool isReactivatableChargeType(const AreaEffectSimulation::ChargeStruct &chargeStruct) const;
|
||||
bool isIndirect(int chargeTypeId) const;
|
||||
int hazardDistance(const AreaEffectSimulation::ChargeStruct &chargeStruct) const;
|
||||
bool isLaserGuidable(const AreaEffectSimulation::ChargeStruct &chargeStruct) const;
|
||||
bool isUasDroppable(const AreaEffectSimulation::ChargeStruct &chargeStruct) const;
|
||||
|
||||
public:
|
||||
bool initializePdm();
|
||||
private:
|
||||
bool m_initialized;
|
||||
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_dtcPdm;
|
||||
QMap<int, ProjectDataManagement::ChargeType> m_chargeTypes;
|
||||
QMap<int, ProjectDataManagement::GearType> m_gearTypes;
|
||||
QMap<int, ProjectDataManagement::GearTypeChargeType> m_gearTypeChargeTypes;
|
||||
QMap<int, ProjectDataManagement::RadioGroup> m_radioGroups;
|
||||
QMap<int, ProjectDataManagement::BuildingChargeEffect> m_buildingChargeEffects;
|
||||
// tasVulnerabilityKindId, ProjectDataManagement::VulnerabilityKind
|
||||
QHash<int, ProjectDataManagement::VulnerabilityKind> m_vulnerabilityKinds;
|
||||
QHash<int, int> m_vulnerabilityKindFallback;
|
||||
MainHandler *m_mainHandler;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user