/** * @RDE_HEADER@ * The FiringUnitValidator regulates the rules for firing units serverside * $Id: participant_dis_helper.h 37747 2017-12-08 08:07:01Z ehrlicher $ * $HeadURL: svn://10.196.0.54/TDS/branches/product/features/24_vulcano/Lts/Plugins/ParticipantManagement/Gui/Common/participant_dis_helper.h $ * $Author: ehrlicher $ * Created by Hannes Fritsche, ESZS, 2024-03-07 */ #pragma once #include #include #include namespace ParticipantManagement { class ParticipantData; namespace TypeHandling { class TypeHandler; } //namespace TypeHandling namespace ParticipantHandling { class ParticipantHandler; class FiringUnitValidator : public QObject { Q_OBJECT public: FiringUnitValidator(const std::shared_ptr &participantHandler, const std::shared_ptr &typeHandler, QObject *parent = nullptr); Core::FunctionReplyObject firingUnitError(const QHash &modIdToParticipantId, const QVector &participantData); private: QString getError(const QHash &modIdToParticipantId, const QVector &participantData, int unitModId) const; int nonModdedInferiorsCount(int unitModId, const QHash &modIdToParticipantId) const; int participantTypeInFiringUnit(int unitModId, const QHash &modIdToParticipantId) const; std::shared_ptr m_participantHandler; std::shared_ptr m_typeHandler; }; // namespace FiringUnitValidator } //namespace ParticipantHandling } // namespace ParticipantManagement