Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+51
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @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 <QObject>
|
||||
#include <memory>
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
|
||||
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> &participantHandler,
|
||||
const std::shared_ptr<TypeHandling::TypeHandler> &typeHandler,
|
||||
QObject *parent = nullptr);
|
||||
|
||||
Core::FunctionReplyObject firingUnitError(const QHash<int, int> &modIdToParticipantId, const QVector<ParticipantData> &participantData);
|
||||
|
||||
private:
|
||||
QString getError(const QHash<int, int> &modIdToParticipantId, const QVector<ParticipantData> &participantData, int unitModId) const;
|
||||
|
||||
int nonModdedInferiorsCount(int unitModId, const QHash<int, int> &modIdToParticipantId) const;
|
||||
int participantTypeInFiringUnit(int unitModId, const QHash<int, int> &modIdToParticipantId) const;
|
||||
|
||||
std::shared_ptr<ParticipantHandler> m_participantHandler;
|
||||
std::shared_ptr<TypeHandling::TypeHandler> m_typeHandler;
|
||||
}; // namespace FiringUnitValidator
|
||||
} //namespace ParticipantHandling
|
||||
} // namespace ParticipantManagement
|
||||
|
||||
Reference in new issue
Block a user