Removes .IDL warnings: multiple enum definitons and builtin-type collisions

This commit is contained in:
torsten committed 2026-09-14 15:45:58 +00:00
1 parent eb02c1f001
commit be912de9d6
135 files changed
+1122 -1122

No files matched your search

@@ -20,7 +20,7 @@ namespace dds
{
namespace core
{
inline uint qHash(ProjectDataManagement::EventType et)
inline uint qHash(ProjectDataManagement::PdmEventType et)
{
return ::qHash(et.underlying());
}
@@ -440,7 +440,7 @@ void HandlerNBC::deleteDangerArea(const int aesItemId)
const auto partPosMap = m_handlerParticipant->positions();
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
{
sendParticipantEvent(aesItemId, participantPos, ProjectDataManagement::EventType_def::LeaveDangerArea);
sendParticipantEvent(aesItemId, participantPos, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
DEBUG_LOG(m_logger) << "Participant inside id=" << participantPos.participantId();
}// for all Participants
} // deleteDangerArea
@@ -627,10 +627,10 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
break;
}
case AreaEffectSimulation::AesType_def::AtDangerArea:
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::EnterDangerArea);
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::EnterDangerArea);
break;
case AreaEffectSimulation::AesType_def::AtNContamination:
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::EnterNuclear);
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::EnterNuclear);
sendEffectTypeEvent(aesItemId, participantData, effectTypeForNContaminationArea(m_aesItemViews.value(aesItemId), participantPosUtmPoint, participantData.sampleTime(), participantData.insideBuilding()));
break;
case AreaEffectSimulation::AesType_def::AtExplosionArea:
@@ -660,13 +660,13 @@ void HandlerNBC::sendLeaveEvent(const int aesItemId, const CentralEffectSimulati
sendEffectTypeEvent(aesItemId, participantData, EffectType::BCContaminationLeave);
break;
case AreaEffectSimulation::AesType_def::AtDangerArea:
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::LeaveDangerArea);
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
break;
case AreaEffectSimulation::AesType_def::AtMineArea:
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::LeaveMineArea);
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveMineArea);
break;
case AreaEffectSimulation::AesType_def::AtNContamination:
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::LeaveNuclear);
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveNuclear);
sendEffectTypeEvent(aesItemId, participantData, EffectType::NContaminationLeave);
break;
case AreaEffectSimulation::AesType_def::AtExplosionArea:
@@ -784,7 +784,7 @@ void HandlerNBC::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm
participantData.roomId());
const int originatorEquipNo = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
const ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
TrainingAreaBase::SendCesHitRequest requestTab(
equipNo, // equipmentNumber
participantData.participantId(), // participantId
@@ -881,7 +881,7 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
participantData.pos(), Core::PositionReportingSource_def::Gps, participantData.buildingId(),
participantData.roomId()
);
const ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
TrainingAreaBase::SendCesHitRequest requestTab(
equipmentNumber, participantData.participantId(), legacyChargeTypeId, aesItemId, originatorEquipmentNumber,
remaining, pos, effectTime, eventType, partyId, mineFieldBitIndex
@@ -899,7 +899,7 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
void HandlerNBC::sendParticipantEvent(const int aesItemId,
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
const ProjectDataManagement::EventType eventType)
const ProjectDataManagement::PdmEventType eventType)
{
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantData.participantTypeId());
// can happen since the positions are collected for all participants (no check if it is a SupportEntity or similar)
@@ -931,12 +931,12 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
}
// send hit events only with central AES Simulation
if (eventType == ProjectDataManagement::EventType_def::HitB
|| eventType == ProjectDataManagement::EventType_def::HitC
|| eventType == ProjectDataManagement::EventType_def::Hit
|| eventType == ProjectDataManagement::EventType_def::HitEffectSimulation
|| eventType == ProjectDataManagement::EventType_def::HitMine
|| eventType == ProjectDataManagement::EventType_def::HitN)
if (eventType == ProjectDataManagement::PdmEventType_def::HitB
|| eventType == ProjectDataManagement::PdmEventType_def::HitC
|| eventType == ProjectDataManagement::PdmEventType_def::Hit
|| eventType == ProjectDataManagement::PdmEventType_def::HitEffectSimulation
|| eventType == ProjectDataManagement::PdmEventType_def::HitMine
|| eventType == ProjectDataManagement::PdmEventType_def::HitN)
{
DEBUG_LOG(m_logger) << "send hit events only with central AES Simulation participant=" << participantData.participantId();
return;
@@ -963,17 +963,17 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
pe.aesItemId(aesItemId);
pe.partyId(participantData.partyId());
if (eventType == ProjectDataManagement::EventType_def::BCContamination)
if (eventType == ProjectDataManagement::PdmEventType_def::BCContamination)
{
const AreaEffectSimulation::BCContamination &bc = m_ddsHandler->dtcAes()->bCContamination(aesItemId);
pe.aesName(bc.name());
}
else if (eventType == ProjectDataManagement::EventType_def::DangerArea)
else if (eventType == ProjectDataManagement::PdmEventType_def::DangerArea)
{
const AreaEffectSimulation::DangerArea &da = m_ddsHandler->dtcAes()->dangerArea(aesItemId);
pe.aesName(da.name());
}
else if (eventType == ProjectDataManagement::EventType_def::NContamination)
else if (eventType == ProjectDataManagement::PdmEventType_def::NContamination)
{
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(aesItemId);
pe.aesName(nc.name());
@@ -988,14 +988,14 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
// Criterion for friendly Fire:
if (aesItem.partyId() != -1
&& ((eventType == ProjectDataManagement::EventType_def::EnterMineArea
|| eventType == ProjectDataManagement::EventType_def::EnterNuclear
|| eventType == ProjectDataManagement::EventType_def::HitB
|| eventType == ProjectDataManagement::EventType_def::HitC
|| eventType == ProjectDataManagement::EventType_def::Hit
|| eventType == ProjectDataManagement::EventType_def::HitEffectSimulation
|| eventType == ProjectDataManagement::EventType_def::HitMine
|| eventType == ProjectDataManagement::EventType_def::HitN)
&& ((eventType == ProjectDataManagement::PdmEventType_def::EnterMineArea
|| eventType == ProjectDataManagement::PdmEventType_def::EnterNuclear
|| eventType == ProjectDataManagement::PdmEventType_def::HitB
|| eventType == ProjectDataManagement::PdmEventType_def::HitC
|| eventType == ProjectDataManagement::PdmEventType_def::Hit
|| eventType == ProjectDataManagement::PdmEventType_def::HitEffectSimulation
|| eventType == ProjectDataManagement::PdmEventType_def::HitMine
|| eventType == ProjectDataManagement::PdmEventType_def::HitN)
&& aesItem.partyId() == participantData.partyId()))
pe.friendlyFire(true);
else
@@ -1043,10 +1043,10 @@ void HandlerNBC::sendEffectTypeEvent(const int aesItemId,
bool HandlerNBC::eventMustBeSend(int aesItemId,
int participantId,
const ProjectDataManagement::EventType eventType)
const ProjectDataManagement::PdmEventType eventType)
{
// end enter-leave only once
QSet<ProjectDataManagement::EventType> &activeEvents = m_eventStates[aesItemId][participantId]; // reference!
QSet<ProjectDataManagement::PdmEventType> &activeEvents = m_eventStates[aesItemId][participantId]; // reference!
// - only send event if it was not already sent
if (activeEvents.contains(eventType))
{
@@ -1060,26 +1060,26 @@ bool HandlerNBC::eventMustBeSend(int aesItemId,
// - remove opposite events (e.g remove Enter event when we leave the area)
switch (eventType.underlying())
{
case ProjectDataManagement::EventType_def::EnterDangerArea:
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveDangerArea);
case ProjectDataManagement::PdmEventType_def::EnterDangerArea:
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
break;
case ProjectDataManagement::EventType_def::LeaveDangerArea:
activeEvents.remove(ProjectDataManagement::EventType_def::EnterDangerArea);
case ProjectDataManagement::PdmEventType_def::LeaveDangerArea:
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterDangerArea);
break;
case ProjectDataManagement::EventType_def::EnterMineArea:
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveMineArea);
case ProjectDataManagement::PdmEventType_def::EnterMineArea:
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveMineArea);
break;
case ProjectDataManagement::EventType_def::LeaveMineArea:
activeEvents.remove(ProjectDataManagement::EventType_def::EnterMineArea);
case ProjectDataManagement::PdmEventType_def::LeaveMineArea:
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterMineArea);
break;
case ProjectDataManagement::EventType_def::EnterNuclear:
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveNuclear);
case ProjectDataManagement::PdmEventType_def::EnterNuclear:
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveNuclear);
break;
case ProjectDataManagement::EventType_def::LeaveNuclear:
activeEvents.remove(ProjectDataManagement::EventType_def::EnterNuclear);
case ProjectDataManagement::PdmEventType_def::LeaveNuclear:
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterNuclear);
break;
case ProjectDataManagement::EventType_def::EnterFunctionalArea:
case ProjectDataManagement::EventType_def::LeaveFunctionalArea:
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
default:
break;
}
@@ -1196,20 +1196,20 @@ bool HandlerNBC::inCircle(const QPointF &centerUtm, const double radius, const Q
} // inCircle
ProjectDataManagement::EventType HandlerNBC::leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
ProjectDataManagement::PdmEventType HandlerNBC::leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
{
switch (aesTypeId.underlying())
{
case AreaEffectSimulation::AesType_def::AtDangerArea:
return ProjectDataManagement::EventType::LeaveDangerArea;
return ProjectDataManagement::PdmEventType::LeaveDangerArea;
case AreaEffectSimulation::AesType_def::AtMineArea:
return ProjectDataManagement::EventType::LeaveMineArea;
return ProjectDataManagement::PdmEventType::LeaveMineArea;
case AreaEffectSimulation::AesType_def::AtNContamination:
return ProjectDataManagement::EventType::LeaveNuclear;
return ProjectDataManagement::PdmEventType::LeaveNuclear;
default:
break;
}
return ProjectDataManagement::EventType::Unknown;
return ProjectDataManagement::PdmEventType::Unknown;
}
EffectType HandlerNBC::leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
@@ -1329,13 +1329,13 @@ void HandlerNBC::aesItemViewRemoved(int aesItemId)
}
}
const auto eventTypeLeave = leaveEventTypeForAesType(aiv.aesTypeId);
if (eventTypeLeave != ProjectDataManagement::EventType::Unknown)
if (eventTypeLeave != ProjectDataManagement::PdmEventType::Unknown)
{
DEBUG_LOG(m_logger) << "aesItemViewRemoved, leaveEventType: " << eventTypeLeave;
auto it = m_eventStates.find(aesItemId);
if (it != m_eventStates.end())
{
const QHash<int, QSet<ProjectDataManagement::EventType>> &participants = it.value();
const QHash<int, QSet<ProjectDataManagement::PdmEventType>> &participants = it.value();
DEBUG_LOG(m_logger) << "aesItemViewRemoved, sending leave events to " << participants.size()
<< " participants";
for (auto itP = participants.begin(); itP != participants.end(); ++ itP)