Files
qt5-legatus-legacy/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.h
T
2026-08-13 18:33:10 +02:00

74 lines
1.7 KiB
C++
Executable File

/**
* Exercise object
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include "dds_handler.h"
#include "esm_convert_from_tab.h"
#include "handler_ppm_data.h"
#include "logger.h"
#include <DDS/Core/function_reply_object.h>
// Generated
#include <EffectShowManagement/esm_db.h>
namespace EffectShowManagement
{
class Initialization;
class ObjectEffectShowVehicleStatus final
{
public:
explicit ObjectEffectShowVehicleStatus(Initialization *mainHandler);
~ObjectEffectShowVehicleStatus();
/**
* @brief Updates the object with the status of the vehicle
* @param[in] vehicleStatus Status of the vehicle
*/
void set(const ConvertFromTab::VehicleStatus_t &vehicleStatus);
/**
* @brief Updates the object with participant data
* @param[in] participant Participant data
*/
void set(const HandlerPpmData::Participant_t &participant);
/**
* @brief Updates the object completely
* @param data Object data
*/
void set(const Database::EsmEffectShowVehicleStatus &data);
void createObject();
void updateObject();
void removeObject();
int getParticipantId() const { return m_data.esmParticipantId; }
qint64 getTimestamp() const { return m_data.timestamp; }
bool getOperational() const { return m_data.operational; }
void setOperational(bool val)
{
bool publish = m_data.operational != val;
m_data.operational = val;
if (publish) onPublishData();
}
int getIdOfEffectShowActor() const { return m_data.esmParticipantId; }
QString getNameOfEffectShowActor() const { return m_data.nameEffectShowActor; }
protected:
void onPublishData();
private:
Initialization *m_mainHandler;
Database::EsmEffectShowVehicleStatus m_data;
NGL::INGLLogger &m_logger;
};
}