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

68 lines
2.3 KiB
C++
Executable File

/**
* @RDE_HEADER@
* ISM Handler Mounting Point Schedule
* $Id$
* $HeadURL$
* $Author$
* Created by Iuliana Ojog, SLSE, 2016-11-26
*/
#pragma once
#include <QHash>
#include "base.h"
//-------------------------------------------------------------------------------------------------------------
namespace InfrastructureManagement
{
class ObjectMainSchedule;
class MainHandler;
class HandlerMainSchedule final : public Base
, protected Interface::Fts::MainScheduleModifyRequestHandler
, protected Interface::Fts::MainScheduleCopyRequestHandler
, protected Interface::Fts::MainScheduleRemoveRequestHandler
, protected Interface::Fts::MountingPointPlanModifyRequestHandler
{
Q_OBJECT
public:
explicit HandlerMainSchedule(MainHandler *mainHandler);
~HandlerMainSchedule();
bool init();
bool initByDbId(int dbId);
std::vector<MountingPointPlan> getMountingPointPlans(int scheduleId) const;
ObjectMainSchedule *getMainSchedule(int scheduleId) const
{
return m_objectMainScheduleMap.value(scheduleId);
}
QHash<int, ObjectMainSchedule *> getMainScheduleMap() const
{
return m_objectMainScheduleMap;
}
private:
void onMainScheduleModifyRequest(const rti::core::SampleIdentity &cookie,
const MainScheduleModifyRequest &request) override final;
Core::FunctionReplyObject mainScheduleCreate(const MainScheduleModifyRequest &request);
Core::FunctionReplyObject mainScheduleModify(const MainScheduleModifyRequest &request);
void onMainScheduleCopyRequest(const rti::core::SampleIdentity &cookie,
const MainScheduleCopyRequest &request) override final;
void onMainScheduleRemoveRequest(const rti::core::SampleIdentity &cookie,
const Core::RemoveElementRequest &request) override final;
void onMountingPointPlanModifyRequest(const rti::core::SampleIdentity &cookie,
const MountingPointPlanModifyRequest &request) override final;
Core::FunctionReplyObject mountingPointPlanModify(const MountingPointPlanModifyRequest &request);
void onDbInsertedSchedule(const QVariant &id_);
private:
QHash<int, ObjectMainSchedule *> m_objectMainScheduleMap;
MainHandler *m_mainHandler;
};
}