Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -28,7 +28,7 @@ LtsWebSocket::AbstractClientMessage *ClientMessageFactory::createMessage(LtsWebS
if (m_type == LtsWebSocket::JsonKeys::ERROR_())
{
ERROR_LOG(m_logger) << "Error in message: " << message;
ERROR_LOG() << "Error in message: " << message;
return nullptr;
}
@@ -46,7 +46,7 @@ LtsWebSocket::AbstractClientMessage *ClientMessageFactory::createMessage(LtsWebS
if (!result)
{
ERROR_LOG(m_logger) << "message: " << message;
ERROR_LOG() << "message: " << message;
Q_ASSERT(result);
}
@@ -109,13 +109,12 @@ DataManager::DataManager(const std::shared_ptr<IWMS2ECC_Impl> &wms2ecc, const st
, m_wms2ecc(wms2ecc)
, m_ddsHandler(ddsHandler)
, m_exercisesHandler(exHandler)
, m_logger(getLogger("MainHandler"))
{
connect(m_wsReconnectTimer, &QTimer::timeout,
this, &DataManager::openWebSocket);
m_messageFactory = new ClientMessageFactory(this);
DEBUG_LOG(m_logger) << "WarehouseManagement/WmsServer = " << Settings::wmsServerName();
DEBUG_LOG() << "WarehouseManagement/WmsServer = " << Settings::wmsServerName();
}
DataManager::~DataManager()
@@ -155,7 +154,7 @@ void DataManager::openWebSocket()
int port = NGL::Connections::port(NGL::Connections::eConnection::ZSLV);
QString url = QStringLiteral("ws://") + Settings::wmsServerName() + QStringLiteral(":") + QString::number(port);
wsSocket->open(QUrl::fromEncoded(url.toLocal8Bit()));
INFO_LOG(m_logger) << "Trying to listen on " << url;
INFO_LOG() << "Trying to listen on " << url;
m_wsReconnectTimer->start(5000);
}
@@ -273,7 +272,7 @@ void DataManager::handleEquipmentTypes(const ::EquipmentTypes &eTypes)
{
const IWMS2ECC::equipTypeMap equipTypeMap = eTypes.getEquipmentTypes();
INFO_LOG(m_logger) << "equipTypeMap size: " << equipTypeMap.size();
INFO_LOG() << "equipTypeMap size: " << equipTypeMap.size();
ParticipantManagement::ModifyEquipmentTypeDataRequest request;
request.deleteAll(true);
auto &dataVec = request.data();
@@ -293,7 +292,7 @@ void DataManager::handleEquipmentTypes(const ::EquipmentTypes &eTypes)
dataVec.push_back(std::move(pEt));
}
INFO_LOG(m_logger) << "dataVec size: " << dataVec.size() << ", " << request;
INFO_LOG() << "dataVec size: " << dataVec.size() << ", " << request;
m_ddsHandler->ppmFtc()->modifyEquipmentTypeDataRequest(request, this);
}
@@ -301,9 +300,9 @@ void DataManager::handleEquipmentTypes(const ::EquipmentTypes &eTypes)
void DataManager::onModifyEquipmentTypeDataReply(const Core::FunctionReplyObject &replyObject)
{
if (replyObject.error())
ERROR_LOG(m_logger) << "Error while modifying equipmentType: " << replyObject.str();
ERROR_LOG() << "Error while modifying equipmentType: " << replyObject.str();
else
INFO_LOG(m_logger) << "onModifyEquipmentTypeDataReply ok";
INFO_LOG() << "onModifyEquipmentTypeDataReply ok";
}
void DataManager::newTextMessageFromClient(LtsWebSocket::ClientConnection *client, const QString &message)
@@ -314,7 +313,7 @@ void DataManager::newTextMessageFromClient(LtsWebSocket::ClientConnection *clien
clientMessage = m_messageFactory->createMessage(client, message);
else
{
WARNING_LOG(m_logger) << "Could not parse incoming message: '" << message << "', error: " << result.errorString();
WARNING_LOG() << "Could not parse incoming message: '" << message << "', error: " << result.errorString();
clientMessage = new LtsWebSocket::InvalidMessage(client, QString(), QStringLiteral("Got message which is not JSON conform"));
}
@@ -331,7 +330,7 @@ void DataManager::onParticipantChanged(const ParticipantManagement::Participant
if (!m_clientConnection || !m_wms2ecc)
return;
DEBUG_LOG(m_logger) << "partyId: " << data.partyId() << "participantId: " << data.id();
DEBUG_LOG() << "partyId: " << data.partyId() << "participantId: " << data.id();
IWMS2ECC::PlayerInfo pl = m_wms2ecc->convert(data, exerciseId);
pl.playerId = (exerciseId* 1000000) + pl.playerId;
m_clientConnection->addReply(new ParticipantUpdate(pl, modType));
@@ -342,7 +341,7 @@ void DataManager::onExerciseChanged(const ExerciseManagement::Exercise &data, Da
if (!m_clientConnection)
return;
INFO_LOG(m_logger) << "IN onExerciseChanged: ExerciseUpdate: id = " << data.id();
INFO_LOG() << "IN onExerciseChanged: ExerciseUpdate: id = " << data.id();
IWMS2ECC::Exercise exeData = IWMS2ECC_Impl::convert(data);
m_clientConnection->addReply(new ExerciseUpdate(exeData, modType));
@@ -356,9 +355,9 @@ void DataManager::onRegistrationReturnValue(int exerciseId, qint32 participantId
void DataManager::registerParticipant(const Registration &reg)
{
ParticipantManagement::ParticipantAssignState state = IWMS2ECC_Impl::convert(reg.getAssignment());
INFO_LOG(m_logger) << "ParticipantAssignState: " << state;
INFO_LOG() << "ParticipantAssignState: " << state;
INFO_LOG(m_logger) << "Registration: participant: " << reg.getPlayerId() << ", exerciseId: " << reg.getExerciseId();
INFO_LOG() << "Registration: participant: " << reg.getPlayerId() << ", exerciseId: " << reg.getExerciseId();
dds::core::optional<int> equipNo;
dds::core::optional<QString> identification;
@@ -172,7 +172,5 @@ private:
std::shared_ptr<IWMS2ECC_Impl> m_wms2ecc;
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<ExercisesHandler> m_exercisesHandler;
LOGGER_T m_logger;
};
}
@@ -10,16 +10,15 @@ namespace WarehouseManagement
DdsHandler::DdsHandler(int domainId)
: m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, 0))
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
DEBUG_LOG() << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
}
bool DdsHandler::init(const QStringList &qosFileList)
{
if (!m_ddsConnector->init(qosFileList))
{
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
ERROR_LOG() << "Error initializing dds connections - aborting";
return false;
}
@@ -31,7 +30,7 @@ bool DdsHandler::init(const QStringList &qosFileList)
m_exmDtc = ExerciseManagement::Interface::Dtc::create(m_ddsConnector);
bool bRet = m_exmDtc->enableExercise();
INFO_LOG(m_logger) << "Exm dtc initialised";
INFO_LOG() << "Exm dtc initialised";
m_ppmDtc = ParticipantManagement::Interface::Dtc::create(m_ddsConnector);
bRet &= m_ppmDtc->enableType();
@@ -42,7 +42,6 @@ private:
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_exmDtc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ppmFtc;
NGL::INGLLogger &m_logger;
};
}
@@ -11,17 +11,16 @@ namespace WarehouseManagement
DdsHandlerExercise::DdsHandlerExercise(const dds::domain::DomainParticipant &dp, int exerciseId)
: m_ddsConnector(new DDSConnector::DdsConnector(dp, IDL::PartitionType::Exercise, exerciseId))
, m_logger(getLogger("DdsHandlerExercise"))
{
m_ddsConnector->setDomainParticipant(dp);
DEBUG_LOG(m_logger) << "DdsHandlerExercise for partition: " << m_ddsConnector->getDefaultPartition();
DEBUG_LOG() << "DdsHandlerExercise for partition: " << m_ddsConnector->getDefaultPartition();
}
bool DdsHandlerExercise::init(const QStringList &qosFileList)
{
if (!m_ddsConnector->init(qosFileList))
{
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
ERROR_LOG() << "Error initializing dds connections - aborting";
return false;
}
@@ -41,8 +41,6 @@ private:
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
PpmDtc m_ppmDtc;
PpmFtc m_ppmFtc;
NGL::INGLLogger &m_logger;
};
}
@@ -97,7 +97,7 @@ void ExerciseParticipantHandler::registerParticipant(qint32 participantId,
}
req.participantId(participantId);
INFO_LOG(m_logger) << "IN ::registerParticipant, ParticipantId: " << participantId
INFO_LOG() << "IN ::registerParticipant, ParticipantId: " << participantId
<< ", equipNo: " << equipNo << ", assignState: " << assignState;
m_ddsHandlerExercise->ppmFtc()->registerParticipantRequest(req, this);
@@ -105,7 +105,7 @@ void ExerciseParticipantHandler::registerParticipant(qint32 participantId,
void ExerciseParticipantHandler::onRegisterParticipantReply(const ParticipantManagement::RegisterReply &reply)
{
INFO_LOG(m_logger) << "RegisterReply id " << reply.id()
INFO_LOG() << "RegisterReply id " << reply.id()
<< " - registerReturnValue: " << reply.registerReturnValue()
<< " for exercise " << reply.exerciseId();
@@ -119,7 +119,7 @@ void ExerciseParticipantHandler::onRegisterParticipantReply(const ParticipantMan
emit registrationReturnValue(reply.exerciseId(), reply.id(), reply.registerReturnValue());
if (fro.error())
ERROR_LOG(m_logger) << "Error: " << fro();
ERROR_LOG() << "Error: " << fro();
}
void ExerciseParticipantHandler::participantAdded(const ParticipantManagement::Participant &participant)
@@ -128,7 +128,7 @@ void ExerciseParticipantHandler::participantAdded(const ParticipantManagement::P
if (!participant.equipmentNumber().is_set() || participant.equipmentNumber().get() == 0)
{
INFO_LOG(m_logger) << "New participant but no equipment number - ignoring";
INFO_LOG() << "New participant but no equipment number - ignoring";
return;
}
addParticipant(participant.id(), participant.equipmentNumber().get());
@@ -168,7 +168,7 @@ void ExerciseParticipantHandler::participantModified(const ParticipantManagement
}
if (participant.equipmentNumber().is_set())
{
INFO_LOG(m_logger) << "Participant with id " << participant.id() << " changed its equipment number from "
INFO_LOG() << "Participant with id " << participant.id() << " changed its equipment number from "
<< itEquipNumber.value() << " to " << participant.equipmentNumber().get();
}
@@ -192,7 +192,7 @@ void ExerciseParticipantHandler::participantRemoved(const ParticipantManagement:
if (itEquipNumber == m_participantId2EquipmentNumber.end())
{
INFO_LOG(m_logger) << "Participant was removed but has no equipment number - ignoring";
INFO_LOG() << "Participant was removed but has no equipment number - ignoring";
return;
}
removeParticipant(itEquipNumber.key(), itEquipNumber.value());
@@ -59,6 +59,5 @@ private:
QHash<int, int> m_participantId2EquipmentNumber;
QHash<int, ParticipantManagement::Party> m_partyMap;
NGL::INGLLogger &m_logger;
};
}
@@ -9,7 +9,6 @@ namespace WarehouseManagement
ExercisesHandler::ExercisesHandler(const std::shared_ptr<DdsHandler> &ddsHandler)
: m_ddsHandler(ddsHandler)
, m_logger(getLogger("ExercisesHandler"))
{}
ExercisesHandler::~ExercisesHandler()
@@ -33,7 +32,7 @@ bool ExercisesHandler::init()
QMap<qint32, ExerciseManagement::Exercise> ExercisesHandler::getExercises() const
{
INFO_LOG(m_logger) << "IN getExercises";
INFO_LOG() << "IN getExercises";
m_ddsHandler->exmDtc()->waitForHistoricalDataExercise();
return m_ddsHandler->exmDtc()->exercises();
}
@@ -63,7 +62,7 @@ ParticipantManagement::TypeClass ExercisesHandler::typeClassIdFromEquipmentTypeI
ParticipantManagement::Party ExercisesHandler::getParty(int partyId, int exerciseId) const
{
DEBUG_LOG(m_logger) << "getParty: " << partyId << ", exId: " << exerciseId;
DEBUG_LOG() << "getParty: " << partyId << ", exId: " << exerciseId;
auto it = m_exerciseHandler.find(exerciseId);
if (it == m_exerciseHandler.end())
return ParticipantManagement::Party();
@@ -151,7 +150,7 @@ bool ExercisesHandler::modifyEquipmentTypes(const std::vector<ParticipantManagem
void ExercisesHandler::onModifyEquipmentTypeDataReply(const Core::FunctionReplyObject &replyObject)
{
if (replyObject.error())
ERROR_LOG(m_logger) << replyObject();
ERROR_LOG() << replyObject();
}
bool ExercisesHandler::addParticipant(const ParticipantInfoStruct &pis)
@@ -165,7 +164,7 @@ bool ExercisesHandler::modifyParticipant(const ParticipantInfoStruct &pis)
auto it = findParticipant(pis);
if (it == m_participants.end())
{
ERROR_LOG(m_logger) << "Trying to modify a participant which is not in our map. mod: "
ERROR_LOG() << "Trying to modify a participant which is not in our map. mod: "
<< pis;
return false;
}
@@ -178,7 +177,7 @@ bool ExercisesHandler::removeParticipant(const ParticipantInfoStruct &pis)
auto it = findParticipant(pis);
if (it == m_participants.end())
{
ERROR_LOG(m_logger) << "Trying to remove a participant which is not in our map. mod: "
ERROR_LOG() << "Trying to remove a participant which is not in our map. mod: "
<< pis;
return false;
}
@@ -204,11 +203,11 @@ QVector<ParticipantInfoStruct> ExercisesHandler::infoStructForEquipment(int equi
void ExercisesHandler::exerciseAdded(int exerciseId)
{
INFO_LOG(m_logger) << "Exercise with id " << exerciseId << " created";
INFO_LOG() << "Exercise with id " << exerciseId << " created";
auto it = m_exerciseHandler.find(exerciseId);
if (it != m_exerciseHandler.end())
{
WARNING_LOG(m_logger) << "Exercise with id " << exerciseId
WARNING_LOG() << "Exercise with id " << exerciseId
<< " added but it was already in our list - recreating handler";
delete it.value();
m_exerciseHandler.erase(it);
@@ -216,7 +215,7 @@ void ExercisesHandler::exerciseAdded(int exerciseId)
ExerciseParticipantHandler *exH = new ExerciseParticipantHandler(m_ddsHandler->getDomainParticipant(), exerciseId, this);
if (!exH->init())
{
ERROR_LOG(m_logger) << "Error initializing ExerciseHandler for exercise " << exerciseId;
ERROR_LOG() << "Error initializing ExerciseHandler for exercise " << exerciseId;
delete exH;
return;
}
@@ -224,17 +223,17 @@ void ExercisesHandler::exerciseAdded(int exerciseId)
this, &ExercisesHandler::registrationReturnValue);
connect(exH, &ExerciseParticipantHandler::participantChanged,
this, &ExercisesHandler::participantChanged);
INFO_LOG(m_logger) << "Successfully created exercise handler for exercise " << exerciseId;
INFO_LOG() << "Successfully created exercise handler for exercise " << exerciseId;
m_exerciseHandler[exerciseId] = exH;
}
void ExercisesHandler::exerciseRemoved(int exerciseId)
{
INFO_LOG(m_logger) << "Exercise with id " << exerciseId << " removed";
INFO_LOG() << "Exercise with id " << exerciseId << " removed";
auto it = m_exerciseHandler.find(exerciseId);
if (it == m_exerciseHandler.end())
{
WARNING_LOG(m_logger) << "Exercise removed but it was not found in our internal map";
WARNING_LOG() << "Exercise removed but it was not found in our internal map";
return;
}
delete it.value();
@@ -83,6 +83,5 @@ private:
QHash<int, ExerciseParticipantHandler *> m_exerciseHandler;
QMultiHash<int, ParticipantInfoStruct> m_participants;
NGL::INGLLogger &m_logger;
};
}
@@ -17,7 +17,6 @@ namespace WarehouseManagement
IWMS2ECC_Impl::IWMS2ECC_Impl(const std::shared_ptr<ExercisesHandler> &exercisesHandler)
: m_exercisesHandler(exercisesHandler)
, m_logger(getLogger("Wms2Ecc"))
{
connect(m_exercisesHandler.get(), &ExercisesHandler::registrationReturnValue,
this, &IWMS2ECC_Impl::onRegistrationReturnValue);
@@ -55,7 +54,7 @@ IWMS2ECC::PlayerInfo IWMS2ECC_Impl::convert(const ParticipantManagement::Partici
pi.exerciseId = exerciseId;
pi.forceId = part.partyId();
DEBUG_LOG(m_logger) << "Force Id = " << pi.forceId;
DEBUG_LOG() << "Force Id = " << pi.forceId;
pi.info = QString::fromStdString(part.info());
pi.parentPlayerId = part.superiorId();
@@ -68,10 +67,10 @@ IWMS2ECC::PlayerInfo IWMS2ECC_Impl::convert(const ParticipantManagement::Partici
{
pi.equipTypeId = partType.equipmentTypeId();
pi.typeClassId = convert(partType.typeClass());
TRACE_LOG(m_logger) << "Found participant type with id " << part.typeId() << ", " << pi.typeClassId << ", " << pi.equipTypeId;
TRACE_LOG() << "Found participant type with id " << part.typeId() << ", " << pi.typeClassId << ", " << pi.equipTypeId;
}
else
WARNING_LOG(m_logger) << "Can not find participant type with id " << part.typeId();
WARNING_LOG() << "Can not find participant type with id " << part.typeId();
pi.typeId = part.typeId();
pi.isDeleted = part.isDeleted();
@@ -81,8 +80,8 @@ IWMS2ECC::PlayerInfo IWMS2ECC_Impl::convert(const ParticipantManagement::Partici
pi.symbolColor = party.color();
DEBUG_LOG(m_logger) << "party.name: " << pi.forceName;
DEBUG_LOG(m_logger) << "symbolColor: " << pi.symbolColor << ", playerId: " << pi.playerId << ", exerciseId: " << exerciseId;
DEBUG_LOG() << "party.name: " << pi.forceName;
DEBUG_LOG() << "symbolColor: " << pi.symbolColor << ", playerId: " << pi.playerId << ", exerciseId: " << exerciseId;
return pi;
@@ -98,7 +97,7 @@ IWMS2ECC::exerciseMap IWMS2ECC_Impl::getExercises() const
retMap.insert(ex.id(), convert(ex));
}
INFO_LOG(m_logger) << "IN getExercises, exMap.size(): " << exMap.size()
INFO_LOG() << "IN getExercises, exMap.size(): " << exMap.size()
<< ", retMap.size: " << retMap.size();
return retMap;
}
@@ -132,12 +131,12 @@ QMap<int, IWMS2ECC::PlayerInfo> IWMS2ECC_Impl::getAllPlayers(int exerciseId) con
QMap<int, IWMS2ECC::PlayerInfo> IWMS2ECC_Impl::getAllParticipants(int exerciseId) const
{
INFO_LOG(m_logger) << "IN getAllParticipants";
INFO_LOG() << "IN getAllParticipants";
QMap<int, IWMS2ECC::PlayerInfo> retMap;
const QMap<qint32, ParticipantManagement::Participant> map = m_exercisesHandler->getParticipants(exerciseId);
INFO_LOG(m_logger) << "getAllPlayers map.size() : " << map.size();
INFO_LOG() << "getAllPlayers map.size() : " << map.size();
for (const ParticipantManagement::Participant &exePart : map)
{
@@ -172,8 +171,8 @@ IWMS2ECC::RegisterReturnValue IWMS2ECC_Impl::registerPlayer(int playerId, int eq
void IWMS2ECC_Impl::onRegistrationReturnValue(int exerciseId, qint32 participantId, ParticipantManagement::RegisterReturnValue retValue)
{
INFO_LOG(m_logger) << "IN onRegistrationReturnValue ";
INFO_LOG(m_logger) << "exerciseId: " << exerciseId << ", participantId: " << participantId << ", retValue: " << retValue;
INFO_LOG() << "IN onRegistrationReturnValue ";
INFO_LOG() << "exerciseId: " << exerciseId << ", participantId: " << participantId << ", retValue: " << retValue;
emit registrationReturnValue(exerciseId, participantId, convert(retValue));
}
@@ -188,12 +187,12 @@ IWMS2ECC::UnregisterReturnValue IWMS2ECC_Impl::unregister(int equipNo, int exerc
IWMS2ECC::PlayerInfo IWMS2ECC_Impl::getPlayerInfo(int playerId, int exerciseId)
{
DEBUG_LOG(m_logger) << "IN getPlayerInfo: "
DEBUG_LOG() << "IN getPlayerInfo: "
<< " playerId = " << playerId << ", exerciseId = " << exerciseId;
if (playerId <= 0 || exerciseId <= 0)
{
WARNING_LOG(m_logger) << "Invalid Player (0,0)";
WARNING_LOG() << "Invalid Player (0,0)";
IWMS2ECC::PlayerInfo pi;
pi.playerState = NOT_FOUND;
return pi;
@@ -218,7 +217,7 @@ IWMS2ECC::PlayerInfo IWMS2ECC_Impl::getPlayerInfo(int playerId, int exerciseId)
pi.playerState = FOUND;
INFO_LOG(m_logger) << "Player (" << pi.playerId << "," << exerciseId << ") found: "
INFO_LOG() << "Player (" << pi.playerId << "," << exerciseId << ") found: "
<< "AssignState: " << pi.assignState << ", forceName: " << pi.forceName;
return pi;
@@ -231,7 +230,7 @@ QMap<int, int> IWMS2ECC_Impl::getEquipRequirements(int exerciseId) const
const QMap<qint32, ParticipantManagement::Participant> map = m_exercisesHandler->getParticipants(exerciseId);
INFO_LOG(m_logger) << "getAllPlayers map.size() : " << map.size();
INFO_LOG() << "getAllPlayers map.size() : " << map.size();
QMap<int, int> reqPartTypes;
@@ -251,17 +250,17 @@ QMap<int, int> IWMS2ECC_Impl::getEquipRequirements(int exerciseId) const
const ParticipantManagement::Type partType = m_exercisesHandler->participantType(typeId);
if (partType.id() == typeId)
{
DEBUG_LOG(m_logger) << "Key: " << typeId;
DEBUG_LOG() << "Key: " << typeId;
ParticipantManagement::TypeClass typeClass = partType.typeClass();
int equipTypeId = partType.equipmentTypeId();
if (typeClass != ParticipantManagement::TypeClass_def::Unit && typeClass != ParticipantManagement::TypeClass_def::SupportUnit)
{
reqEquipTypes[equipTypeId] = cIt.value();
DEBUG_LOG(m_logger) << "equipTypeId: " << equipTypeId << ", amount: " << cIt.value();
DEBUG_LOG() << "equipTypeId: " << equipTypeId << ", amount: " << cIt.value();
}
}
else
WARNING_LOG(m_logger) << "Can not find participant type with id " << typeId;
WARNING_LOG() << "Can not find participant type with id " << typeId;
}
return reqEquipTypes;
}
@@ -409,7 +408,7 @@ bool IWMS2ECC_Impl::setEquipmentType(const EquipmentType &et)
bool IWMS2ECC_Impl::setEquipmentTypes(const equipTypeMap &map)
{
INFO_LOG(m_logger) << "IN setEquipmentTypes: equipMap.size: " << map.size();
INFO_LOG() << "IN setEquipmentTypes: equipMap.size: " << map.size();
std::vector<ParticipantManagement::EquipmentType> vEquipTypes;
vEquipTypes.reserve(map.size());
@@ -74,8 +74,6 @@ protected Q_SLOTS:
private:
const std::shared_ptr<ExercisesHandler> m_exercisesHandler;
NGL::INGLLogger &m_logger;
};
}
@@ -7,8 +7,7 @@ namespace WarehouseManagement
{
MainHandler::MainHandler()
: QObject()
, m_logger(getLogger("MainHandler"))
: QObject()
{}
MainHandler::~MainHandler()
@@ -32,6 +32,5 @@ private:
std::shared_ptr<ExercisesHandler> m_exercisesHandler;
std::shared_ptr<IWMS2ECC_Impl> m_wms2ecc;
DataManager* m_dataManager = nullptr;
LOGGER_T m_logger;
};
}