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

@@ -8,7 +8,7 @@
#pragma once
#include <AreaEffectSimulation/aes_export.h>
#include "svcaescommon_export.h"
#include <math.h>
#include <LtsCoordTrans/lts_coord_trans.h>
#include <QPointF>
@@ -26,7 +26,6 @@ FireAutomaton::FireAutomaton(QObject *parent)
, m_intervalMSecs(0)
, m_remainingTickMSecs(0)
, m_state(State::Uninitialized)
, m_logger(getLogger("Utils.FireAutomaton"))
{
m_timer.setSingleShot(true);
connect(&m_timer, &QTimer::timeout, this, &FireAutomaton::nextTick, Qt::UniqueConnection);
@@ -46,31 +45,31 @@ bool FireAutomaton::init(int32_t time, TimeType type, int32_t rounds, const QVec
{
if(m_state != State::Stopped && m_state != State::Uninitialized)
{
ERROR_LOG(m_logger) << " init failed - fire automaton must be in state unitialized or stopped.";
ERROR_LOG() << " init failed - fire automaton must be in state unitialized or stopped.";
return false;
}
if(time < 0)
{
ERROR_LOG(m_logger) << " init failed - time invalid.";
ERROR_LOG() << " init failed - time invalid.";
return false;
}
if(effectorIds.isEmpty())
{
ERROR_LOG(m_logger) << " init failed - effector Ids invalid.";
ERROR_LOG() << " init failed - effector Ids invalid.";
return false;
}
if(rounds <= 0)
{
ERROR_LOG(m_logger) << " init failed - number of rounds invalid.";
ERROR_LOG() << " init failed - number of rounds invalid.";
return false;
}
if(pattern.isEmpty())
{
ERROR_LOG(m_logger) << " init failed - invalid fire pattern.";
ERROR_LOG() << " init failed - invalid fire pattern.";
return false;
}
@@ -81,13 +80,13 @@ bool FireAutomaton::init(int32_t time, TimeType type, int32_t rounds, const QVec
if(!readPattern(pattern))
{
ERROR_LOG(m_logger) << " init failed - firing pattern invalid.";
ERROR_LOG() << " init failed - firing pattern invalid.";
return false;
}
if(!calculateSchedule(rounds))
{
ERROR_LOG(m_logger) << " init failed - firing schedule invalid.";
ERROR_LOG() << " init failed - firing schedule invalid.";
return false;
}
@@ -167,7 +166,7 @@ bool FireAutomaton::start()
{
if(m_state != State::Stopped)
{
ERROR_LOG(m_logger) << " start failed - fire automaton must be in state stopped.";
ERROR_LOG() << " start failed - fire automaton must be in state stopped.";
return false;
}
@@ -188,7 +187,7 @@ bool FireAutomaton::resume()
{
if(m_state != State::Paused)
{
ERROR_LOG(m_logger) << " resume failed - fire automaton must be in state paused.";
ERROR_LOG() << " resume failed - fire automaton must be in state paused.";
return false;
}
@@ -208,7 +207,7 @@ bool FireAutomaton::pause()
{
if(m_state != State::Running)
{
ERROR_LOG(m_logger) << " pause failed - fire automaton must be in state running.";
ERROR_LOG() << " pause failed - fire automaton must be in state running.";
return false;
}
@@ -243,7 +242,7 @@ bool FireAutomaton::performStep()
{
if(m_state != State::Stopped && m_state != State::Stepping)
{
ERROR_LOG(m_logger) << " performStep failed - fire automaton must be in state stepping or stopped.";
ERROR_LOG() << " performStep failed - fire automaton must be in state stepping or stopped.";
return false;
}
@@ -279,7 +278,7 @@ bool FireAutomaton::readPattern(const QString& pattern)
if(!patternElementFromString(element, patternElement))
{
WARNING_LOG(m_logger) << " skipped invalid firing pattern elements.";
WARNING_LOG() << " skipped invalid firing pattern elements.";
continue;
}
@@ -291,7 +290,7 @@ bool FireAutomaton::readPattern(const QString& pattern)
}
else
{
ERROR_LOG(m_logger) << " a pattern may contain at most one fill element.";
ERROR_LOG() << " a pattern may contain at most one fill element.";
return false;
}
}
@@ -301,7 +300,7 @@ bool FireAutomaton::readPattern(const QString& pattern)
if(m_pattern.empty())
{
ERROR_LOG(m_logger) << " error occured reading firing pattern.";
ERROR_LOG() << " error occured reading firing pattern.";
return false;
}
@@ -413,7 +412,7 @@ bool FireAutomaton::calculateSchedule(int32_t rounds)
if(rounds > 0)
{
ERROR_LOG(m_logger) << " scheduling error - fire pattern does not provide sufficient slots to schedule all rounds. " << rounds;
ERROR_LOG() << " scheduling error - fire pattern does not provide sufficient slots to schedule all rounds. " << rounds;
return false;
}
@@ -99,8 +99,6 @@ private:
int32_t m_intervalMSecs;
int32_t m_remainingTickMSecs;
State m_state;
LOGGER_T m_logger;
};
} // namespace AreaEffectSimulation
@@ -27,7 +27,7 @@ namespace AreaEffectSimulation
// To be able to aesily differentiate between different instances:
#define MY_LOGFUNCTION "debugInfo='" << d->m_debugInfo << "' " << Q_FUNC_INFO
#define MY_Q_FUNC_INFO "debugInfo='" << d->m_debugInfo << "' " << Q_FUNC_INFO
static long s_counter{0};
@@ -129,22 +129,21 @@ public:
FiringTimer::FiringTimer(const QString &debugInfo)
: BaseClass(nullptr)
, d(new Private)
, m_logger(getLogger("Utils.FiringTimer"))
{
++s_counter;
d->m_debugInfo = debugInfo;
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " START, s_counter=" << s_counter << " this=" << this;
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this;
DEBUG_LOG() << MY_Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this;
DEBUG_LOG() << MY_Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this;
}
FiringTimer::~FiringTimer()
{
--s_counter;
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " START, s_counter=" << s_counter << " this=" << this;
DEBUG_LOG() << MY_Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this;
QString debugInfoSave = d->m_debugInfo;
delete d;
//DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this;
DEBUG_LOG(m_logger) << "debugInfo='" << debugInfoSave << "'" << LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this;
//DEBUG_LOG() << MY_Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this;
DEBUG_LOG() << "debugInfo='" << debugInfoSave << "'" << Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this;
}
void FiringTimer::setDebugInfo(const QString &debugInfo)
@@ -154,14 +153,14 @@ void FiringTimer::setDebugInfo(const QString &debugInfo)
void FiringTimer::reset()
{
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
TRACE_LOG() << MY_Q_FUNC_INFO << " START";
d->reset();
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
TRACE_LOG() << MY_Q_FUNC_INFO << " END";
}
bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDurationMsec)
{
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START,"
TRACE_LOG() << MY_Q_FUNC_INFO << " START,"
<< ", effectDurationMsec=" << effectDurationMsec
<< ", ammoCount=" << ammoCount
<< ", ammoFlightDurationMsec=" << ammoFlightDurationMsec;
@@ -171,7 +170,7 @@ bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDu
d->m_ammoCount = ammoCount;
d->m_ammoFlightDurationMsec = ammoFlightDurationMsec;
d->m_intervallMsec = static_cast<double>(d->m_effectDurationMsec) / d->m_ammoCount; // ensure float calculation
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " m_intervallMsec " << d->m_intervallMsec;
DEBUG_LOG() << MY_Q_FUNC_INFO << " m_intervallMsec " << d->m_intervallMsec;
d->m_firingTimer->stop();
d->m_firingTimer->setSingleShot(false);
@@ -179,24 +178,24 @@ bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDu
connect(d->m_firingTimer, &QTimer::timeout,
this, &FiringTimer::onFiringTimout, Qt::UniqueConnection);
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
TRACE_LOG() << MY_Q_FUNC_INFO << " END";
return true;
}
bool FiringTimer::startFiring()
{
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
TRACE_LOG() << MY_Q_FUNC_INFO << " START";
if ((d->m_currentFiringMode != FiringMode::FM_Undefined) &&
(d->m_currentFiringMode != FiringMode::FM_Paused))
{
ERROR_LOG(m_logger) << MY_LOGFUNCTION << " wrong firingMode, cur = " << (int)d->m_currentFiringMode;
ERROR_LOG() << MY_Q_FUNC_INFO << " wrong firingMode, cur = " << (int)d->m_currentFiringMode;
return false;
}
if (remainingAmmoCount() <= 0)
{
ERROR_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left"
ERROR_LOG() << MY_Q_FUNC_INFO << " no ammo left"
<< " (total ammoCount was: " << d->m_ammoCount
<< " cur firingMode = " << (int)d->m_currentFiringMode;
return false;
@@ -214,7 +213,7 @@ bool FiringTimer::startFiring()
#endif // SUPPORT_STATE_CHANGE_DELAYED
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " start firing with m_firedAmmoCount = " << d->m_firedAmmoCount;
DEBUG_LOG() << MY_Q_FUNC_INFO << " start firing with m_firedAmmoCount = " << d->m_firedAmmoCount;
d->m_firingTimer->start();
d->m_currentFiringMode = FiringMode::FM_Active;
@@ -228,7 +227,7 @@ bool FiringTimer::startFiring()
d->m_pausedMsec += pausedElapsedMsec;
d->m_etPaused->invalidate();
}
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " start firing after [ms]: " << pausedElapsedMsec
DEBUG_LOG() << MY_Q_FUNC_INFO << " start firing after [ms]: " << pausedElapsedMsec
<< ", m_activeMsec in total = " << d->m_activeMsec
<< ", m_pausedMsec in total = " << d->m_pausedMsec;
@@ -257,7 +256,7 @@ bool FiringTimer::startFiring()
// to fire at the beginning of the interval:
onFiringTimout();
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
TRACE_LOG() << MY_Q_FUNC_INFO << " END";
return true;
}
@@ -271,17 +270,17 @@ bool FiringTimer::startFiringDelay(qint64 delayMsec)
bool FiringTimer::pauseFiring()
{
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
TRACE_LOG() << MY_Q_FUNC_INFO << " START";
if (d->m_currentFiringMode != FiringMode::FM_Active)
{
ERROR_LOG(m_logger) << MY_LOGFUNCTION << " wrong firingMode";
ERROR_LOG() << MY_Q_FUNC_INFO << " wrong firingMode";
return false;
}
if (remainingAmmoCount() <= 0)
{
ERROR_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left"
ERROR_LOG() << MY_Q_FUNC_INFO << " no ammo left"
<< " (total ammoCount was: " << d->m_ammoCount;
return false;
}
@@ -294,7 +293,7 @@ bool FiringTimer::pauseFiring()
#endif // SUPPORT_STATE_CHANGE_DELAYED
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing at m_firedAmmoCount = " << d->m_firedAmmoCount;
DEBUG_LOG() << MY_Q_FUNC_INFO << " stop firing at m_firedAmmoCount = " << d->m_firedAmmoCount;
d->m_firingTimer->stop();
d->m_currentFiringMode = FiringMode::FM_Paused;
d->m_etPaused->start();
@@ -306,14 +305,14 @@ bool FiringTimer::pauseFiring()
const qint64 activeElapsedMsec = d->m_etActive->elapsed();
d->m_activeMsec += activeElapsedMsec;
d->m_etActive->invalidate();
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing after [ms]: " << activeElapsedMsec
DEBUG_LOG() << MY_Q_FUNC_INFO << " stop firing after [ms]: " << activeElapsedMsec
<< ", m_activeMsec in total = " << d->m_activeMsec
<< ", m_pausedMsec in total = " << d->m_pausedMsec;
QString log = QString(QStringLiteral("pauseFiring_at_%1")).arg(QDateTime::currentMSecsSinceEpoch()) ;
d->m_logHistorie.append(log);
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
TRACE_LOG() << MY_Q_FUNC_INFO << " END";
return true;
}
@@ -347,7 +346,7 @@ long FiringTimer::intervallMsec() const
#ifdef SUPPORT_STATE_CHANGE_DELAYED
void FiringTimer::emitStateChangeDelayed(AreaEffectSimulation::FiringTimer::CMD cmd, int firedAmmoCount)
{
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " SUPPORT_STATE_CHANGE_DELAYED: " << cmd
DEBUG_LOG() << MY_Q_FUNC_INFO << " SUPPORT_STATE_CHANGE_DELAYED: " << cmd
<< ", firedAmmoCount = " << firedAmmoCount;
emit stateChangeDelayedAsInt(static_cast<int>(cmd), firedAmmoCount);
}
@@ -381,11 +380,11 @@ QString FiringTimer::toString(const CMD cmd)
void FiringTimer::onFiringTimout()
{
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
TRACE_LOG() << MY_Q_FUNC_INFO << " START";
++d->m_firedAmmoCount;
INFO_LOG(m_logger) << MY_LOGFUNCTION << " emit firing with: " << d->m_firedAmmoCount
INFO_LOG() << MY_Q_FUNC_INFO << " emit firing with: " << d->m_firedAmmoCount
<< " of total ammoCount = " << d->m_ammoCount;
emit firing(d->m_firedAmmoCount, d->m_ammoCount);
@@ -397,7 +396,7 @@ void FiringTimer::onFiringTimout()
int currentFiringNumber = d->m_firedAmmoCount;
int totalFiringNumber = d->m_ammoCount;
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " XXXXXXXXX schedule 'emit impact' " << currentFiringNumber;
DEBUG_LOG() << MY_Q_FUNC_INFO << " XXXXXXXXX schedule 'emit impact' " << currentFiringNumber;
QTimer::singleShot(d->m_ammoFlightDurationMsec, this, [this, currentFiringNumber, totalFiringNumber]()
{
@@ -409,7 +408,7 @@ void FiringTimer::onFiringTimout()
}
#endif // SUPPORT_STATE_CHANGE_DELAYED
INFO_LOG(m_logger) << MY_LOGFUNCTION << " emit impact " << currentFiringNumber
INFO_LOG() << MY_Q_FUNC_INFO << " emit impact " << currentFiringNumber
<< " of total = " << totalFiringNumber;
emit impact(currentFiringNumber, totalFiringNumber);
@@ -431,7 +430,7 @@ void FiringTimer::onFiringTimout()
if (d->m_firedAmmoCount >= d->m_ammoCount)
{
INFO_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left, finishing firing"
INFO_LOG() << MY_Q_FUNC_INFO << " no ammo left, finishing firing"
<< ", " << d->m_firedAmmoCount << " of total ammoCount = " << d->m_ammoCount << " are fired";
d->m_firingTimer->stop();
@@ -441,7 +440,7 @@ void FiringTimer::onFiringTimout()
// !! Attention: do pauseFiring() WITHIN the intervall will reduce amount of time the firing is active !!
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing after [ms]: " << activeElapsedMsec
DEBUG_LOG() << MY_Q_FUNC_INFO << " stop firing after [ms]: " << activeElapsedMsec
<< ", m_activeMsec in total = " << d->m_activeMsec
<< ", m_pausedMsec in total = " << d->m_pausedMsec
<< " now FiringTimoutExpiredPlus ...";
@@ -466,12 +465,12 @@ void FiringTimer::onFiringTimout()
d->m_firingTimer->start();
}
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END" << ", m_firedAmmoCount " << d->m_firedAmmoCount;
TRACE_LOG() << MY_Q_FUNC_INFO << " END" << ", m_firedAmmoCount " << d->m_firedAmmoCount;
}
void FiringTimer::onFiringTimoutExpiredPlus()
{
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
TRACE_LOG() << MY_Q_FUNC_INFO << " START";
d->m_currentFiringMode = FiringMode::FM_ExpiredPlus;
@@ -481,7 +480,7 @@ void FiringTimer::onFiringTimoutExpiredPlus()
// !! Attention: do pauseFiring() WITHIN the intervall will reduce amount of time the firing is active !!
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing2 after [ms]: " << activeElapsedMsec
DEBUG_LOG() << MY_Q_FUNC_INFO << " stop firing2 after [ms]: " << activeElapsedMsec
<< ", m_activeMsec in total = " << d->m_activeMsec
<< ", m_pausedMsec in total = " << d->m_pausedMsec;
@@ -489,7 +488,7 @@ void FiringTimer::onFiringTimoutExpiredPlus()
emit firingFinishedPlus();
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
TRACE_LOG() << MY_Q_FUNC_INFO << " END";
}
@@ -9,7 +9,7 @@
#pragma once
#include "aes_export.h"
#include "svcaescommon_export.h"
#include "../logger.h"
#include <QObject>
@@ -1649,7 +1649,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
std::vector<Core::GeoPosition> &singlePositionsOut,
NGL::INGLLogger &logger)
{
TRACE_LOG(logger) << LOGFUNCTION << " START, participantId=" << unitParticipantId;
TRACE_LOG(logger) << Q_FUNC_INFO << " START, participantId=" << unitParticipantId;
static const LtsUtils::QPoint3D s_invalidPos(std::nan(""), std::nan(""), std::nan(""));
@@ -1657,7 +1657,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
// See also GUEZE-2309
if (!ppmDtc)
{
ERROR_LOG(logger) << LOGFUNCTION << " ERROR, no ppmDtc";
ERROR_LOG(logger) << Q_FUNC_INFO << " ERROR, no ppmDtc";
return s_invalidPos;
}
ppmDtc->waitForHistoricalDataParticipant(1000);
@@ -1665,7 +1665,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
const ParticipantManagement::Participant &partData = ppmDtc->participant(unitParticipantId);
if (partData.id() != unitParticipantId)
{
ERROR_LOG(logger) << LOGFUNCTION << " ERROR, participant failed for id =" << unitParticipantId;
ERROR_LOG(logger) << Q_FUNC_INFO << " ERROR, participant failed for id =" << unitParticipantId;
return s_invalidPos;
}
ppmDtc->waitForHistoricalDataParticipantPosition(1000);
@@ -1685,7 +1685,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
if (childPos.participantId() != childId)
{
// may happen in real life: so ERROR_LOG to DEBUG_LOG
DEBUG_LOG(logger) << LOGFUNCTION << " ERROR, participantPosition failed for id =" << childId;
DEBUG_LOG(logger) << Q_FUNC_INFO << " ERROR, participantPosition failed for id =" << childId;
return s_invalidPos;
}
const Core::GeoPosition &childGeoPos = childPos.pos();
@@ -1710,7 +1710,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
}
DEBUG_LOG(logger) << "Participant " << unitParticipantId << ": Mean position: " << centerPosToReturn << " #relevant children: " << childCount;
TRACE_LOG(logger) << LOGFUNCTION << " END, participantId=" << unitParticipantId;
TRACE_LOG(logger) << Q_FUNC_INFO << " END, participantId=" << unitParticipantId;
return centerPosToReturn;
}
@@ -8,7 +8,7 @@
#pragma once
#include <AreaEffectSimulation/aes_export.h>
#include "svcaescommon_export.h"
#include <QVector>
#include <QPointF>