Removes .IDL warnings: multiple enum definitons and builtin-type collisions
This commit is contained in:
135 files changed
+1122
-1122
No files matched your search
+52
-52
@@ -23,7 +23,7 @@ namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
inline uint qHash(ProjectDataManagement::EventType et)
|
||||
inline uint qHash(ProjectDataManagement::PdmEventType et)
|
||||
{
|
||||
return ::qHash(et.underlying());
|
||||
}
|
||||
@@ -483,11 +483,11 @@ void HandlerParticipantArea::deleteFunctionalArea(const int aesItemId)
|
||||
// Same as leave FunctionArea
|
||||
if (itemView.aesTypeId == AreaEffectSimulation::AesType_def::AtFunctionalArea)
|
||||
{
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::EventType_def::LeaveFunctionalArea);
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPos, EffectType::FunctionalAreaLeave, -1, -1);
|
||||
}
|
||||
else
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::EventType_def::LeaveDangerArea);
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
DEBUG_LOG(m_logger) << "Participant inside id=" << participantPos.participantId();
|
||||
} // for all Participants
|
||||
} // deleteFunctionalArea
|
||||
@@ -630,19 +630,19 @@ bool HandlerParticipantArea::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
sendEffectTypeEvent(itemView, participantPosition, effectTypeForBCContaminationArea(itemView, participantPosUtmPoint), -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::EnterDangerArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::EnterFunctionalArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::FunctionalAreaEnter, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::EnterMineArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterMineArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::EnterNuclear);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
sendEffectTypeEvent(itemView, participantPosition, effectTypeForNContaminationArea(itemView, participantPosUtmPoint, participantPosition.sampleTime()), -1, -1);
|
||||
break;
|
||||
default:
|
||||
@@ -659,19 +659,19 @@ bool HandlerParticipantArea::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::BCContaminationLeave, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::LeaveDangerArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::LeaveFunctionalArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::FunctionalAreaLeave, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::LeaveMineArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::LeaveNuclear);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::NContaminationLeave, -1, -1);
|
||||
break;
|
||||
default:
|
||||
@@ -1087,7 +1087,7 @@ void HandlerParticipantArea::sendCesHitRequest(const AreaEffectSimulation::AesIt
|
||||
|
||||
void HandlerParticipantArea::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
bool calculateAes = false;
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
@@ -1131,12 +1131,12 @@ void HandlerParticipantArea::sendParticipantEvent(const CentralEffectSimulation:
|
||||
}
|
||||
// send hit events only with central AES Simulation
|
||||
if (calculateAes
|
||||
&& (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::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=" << participantPosition.participantId();
|
||||
return;
|
||||
@@ -1169,14 +1169,14 @@ void HandlerParticipantArea::sendParticipantEvent(const CentralEffectSimulation:
|
||||
|
||||
// Criterion for friendly Fire:
|
||||
if (itemView.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)
|
||||
&& itemView.partyId == participantPosition.partyId()))
|
||||
pe.friendlyFire(true);
|
||||
else
|
||||
@@ -1252,10 +1252,10 @@ void HandlerParticipantArea::sendEffectTypeEvent(const CentralEffectSimulation::
|
||||
|
||||
bool HandlerParticipantArea::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))
|
||||
{
|
||||
@@ -1268,29 +1268,29 @@ bool HandlerParticipantArea::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::EnterFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveFunctionalArea);
|
||||
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::EnterFunctionalArea);
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterFunctionalArea);
|
||||
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;
|
||||
default:
|
||||
break;
|
||||
@@ -1420,22 +1420,22 @@ bool HandlerParticipantArea::inCircle(const QPointF ¢erUtm, const double rad
|
||||
return (squareDist < squareRadius);
|
||||
} // inCircle
|
||||
|
||||
ProjectDataManagement::EventType HandlerParticipantArea::leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
ProjectDataManagement::PdmEventType HandlerParticipantArea::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;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
return ProjectDataManagement::EventType::LeaveFunctionalArea;
|
||||
return ProjectDataManagement::PdmEventType::LeaveFunctionalArea;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ProjectDataManagement::EventType::Unknown;
|
||||
return ProjectDataManagement::PdmEventType::Unknown;
|
||||
}
|
||||
|
||||
EffectType HandlerParticipantArea::leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
@@ -1511,13 +1511,13 @@ void HandlerParticipantArea::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)
|
||||
|
||||
+4
-4
@@ -114,7 +114,7 @@ private: // methoden
|
||||
int mineFieldBitIndex = 0);
|
||||
void sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
void sendEffectTypeEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
EffectType effectType,
|
||||
@@ -123,7 +123,7 @@ private: // methoden
|
||||
|
||||
bool eventMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
bool effectTypeMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
@@ -131,7 +131,7 @@ private: // methoden
|
||||
int mineFieldBitIndex,
|
||||
bool insideBuilding);
|
||||
|
||||
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
ProjectDataManagement::PdmEventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType effectTypeForNContaminationArea(const CentralEffectSimulation::AesItemViewUtm &itemView, const QPointF &participantPosUtmPoint, qint64 partPosSampleTime);
|
||||
EffectType effectTypeForBCContaminationArea(const CentralEffectSimulation::AesItemViewUtm &itemView, const QPointF &participantPosUtmPoint);
|
||||
@@ -153,7 +153,7 @@ private: // attributes
|
||||
QQueue<TrainingAreaBase::SendCesHitRequest> m_sendCesHitRequestQueue;
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_explosionSingleStates; // key = id value = state
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_explosionSingleCentralStates;
|
||||
QHash<int, QHash<int, QSet<ProjectDataManagement::EventType>>> m_eventStates; // QHash<aesItemId, QHash<participantId, QSet<EventType>>>
|
||||
QHash<int, QHash<int, QSet<ProjectDataManagement::PdmEventType>>> m_eventStates; // QHash<aesItemId, QHash<participantId, QSet<EventType>>>
|
||||
QHash<int, QHash<int, QSet<EffectType>>> m_effectTypeStates; // QHash<aesItemId, QHash<participantId, QSet<effectStates>>>
|
||||
QHash<int, QHash<int, QSet<int>>> m_effectTypeBitFieldIndexes; // QHash<aesItemId, QHash<participantId, QSet<mineFieldBitIdx>>>
|
||||
|
||||
|
||||
Reference in new issue
Block a user