53 lines
1.4 KiB
C++
Executable File
53 lines
1.4 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Interface
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "aes_to_situation_map_tmpl.h"
|
|
#include <Plugins/AreaEffectSimulation/aes_data_plugin_interface.h>
|
|
#include <MapObjects/nuclear_agent.h>
|
|
#include <QObject>
|
|
|
|
namespace SituationMap
|
|
{
|
|
|
|
class NContamination2SituationMap;
|
|
template <>
|
|
struct Aes2SituationMapTraits<NContamination2SituationMap>
|
|
{
|
|
using DDS_TYPE = AreaEffectSimulation::NContamination;
|
|
using MAP_TYPE = SituationMap::NuclearAgent;
|
|
static const AreaEffectSimulation::AesType_def::type aesType = AreaEffectSimulation::AesType_def::AtNContamination;
|
|
};
|
|
|
|
class NContamination2SituationMap final : public Aes2SituationMap<NContamination2SituationMap>
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
using BaseClass = SituationMap::Aes2SituationMap<NContamination2SituationMap>;
|
|
using BaseClass::BaseClass;
|
|
|
|
bool run() override;
|
|
bool iterateAesData(const std::function<bool(const AreaEffectSimulation::NContamination &data)> &cb) const
|
|
{
|
|
return m_aesDtc->nContaminations(cb);
|
|
}
|
|
protected Q_SLOTS:
|
|
void onPartitionTimeChanged(qint64 newPartitionTime);
|
|
protected:
|
|
void updateAllSpheres3D(qint64 newPartitionTime);
|
|
bool updateSphere3D(RefPointer<MAP_T> mapObj, const AreaEffectSimulation::NContamination &data, qint64 newPartitionTime);
|
|
|
|
protected:
|
|
bool updateElementImpl(const Sim2SituationMap::DDS_T &ddsData,
|
|
RefPointer<MAP_T> mapObj) override;
|
|
};
|
|
|
|
} // namespace
|