Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include "aes_fts.h"
|
||||
|
||||
#include "logger.h"
|
||||
#include <QHash>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
class ObjectChargeEffect;
|
||||
class MainHandler;
|
||||
class HandlerTrajectory;
|
||||
class TrajectoryData;
|
||||
|
||||
class HandlerChargeEffect
|
||||
: public QObject
|
||||
, public Interface::Fts::ChargeEffectModifyRequestHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit HandlerChargeEffect(MainHandler *mainhandler, QObject *parent = nullptr);
|
||||
~HandlerChargeEffect();
|
||||
bool init();
|
||||
|
||||
void onChargeEffectModifyRequest(const rti::core::SampleIdentity &cookie, const ChargeEffectModifyRequest &request);
|
||||
Core::FunctionReplyObject createChargeEffect(const ChargeEffectModifyRequest &request);
|
||||
static TrajectoryData trajectoryData(int chargeEffectId, const TrajectoryTimeAware &trajectoryTimeAware, int trajObjId = -1);
|
||||
|
||||
const ObjectChargeEffect *getChargeEffectById(int chargeEffectId);
|
||||
|
||||
Q_SIGNALS:
|
||||
void chargeEffectActive(const int id);
|
||||
void chargeEffectExpired(const int id);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onChargeEffectFinished(qint32 chargeEffectId);
|
||||
void onChargeEffectStateChanged(const int id, AesEffectState newState);
|
||||
|
||||
private: // methods
|
||||
Core::FunctionReplyObject updateChargeEffect(const ChargeEffectModifyRequest &request);
|
||||
|
||||
private: // attributes
|
||||
MainHandler *m_mainHandler {nullptr};
|
||||
QHash<qint32, ObjectChargeEffect*> m_chargeEffects;
|
||||
QHash<qint32, qint32> m_trajObjIds; // <chartgeEffectId, trajectoryObjId>
|
||||
HandlerTrajectory *m_trajectoryHandler{nullptr};
|
||||
|
||||
LOGGER_T m_logger;
|
||||
}; // class HandlerChargeEffect
|
||||
} // namespace AreaEffectSimulation
|
||||
Reference in new issue
Block a user