Merge feature/qt6-migration-basis-modules-services into feature/qt6-migration-basis-modules

Resolves 17 conflicts against legacy Qt5 semantics; validates with BUILD_RTI=ON BUILD_GRANTLEE=ON.
This commit is contained in:
berrux-dev committed 2026-09-24 10:10:25 +02:00
commit 5381c65fee
1200 files changed
+20421 -18259

No files matched your search

@@ -0,0 +1,107 @@
/**
* @file core.hpp
* @brief Core DDS Sammel-Header
*
* Beinhaltet alle Core-Typen für DDS-Integration.
*
* STUB: Diese Datei wird normalerweise von DDS generiert.
* Für die Qt6-Migration erstellen wir einen minimalen Stub.
*/
#pragma once
#include <Core/core_types.h>
#include <Core/core_enums.hpp>
#include <Core/core_dtc.h>
#include <ostream>
namespace Core
{
/**
* @brief GeoPosition - Stub für DDS GeoPosition
*
* Einfache Struktur für geographische Positionen.
*/
struct GeoPosition
{
double longitude = 0.0;
double latitude = 0.0;
double altitude = 0.0;
GeoPosition() = default;
GeoPosition(double lon, double lat, double z)
: longitude(lon)
, latitude(lat)
, altitude(z)
{
}
double lon() const { return longitude; }
double lat() const { return latitude; }
double z() const { return altitude; }
void lon(double lon) { longitude = lon; }
void lat(double lat) { latitude = lat; }
void z(double z) { altitude = z; }
void setLon(double lon) { longitude = lon; }
void setLat(double lat) { latitude = lat; }
void setZ(double z) { altitude = z; }
};
/**
* @brief GeoPosition2D - 2D GeoPosition (ohne Altitude)
*
* Wird für Koordinaten ohne Höheninformation verwendet.
* Implizite Konversion von GeoPosition ermöglicht Downcast.
*/
struct GeoPosition2D
{
double longitude = 0.0;
double latitude = 0.0;
GeoPosition2D() = default;
GeoPosition2D(double lon, double lat)
: longitude(lon)
, latitude(lat)
{
}
// Implizite Konversion von GeoPosition (Downcast ignoriert altitude)
GeoPosition2D(const GeoPosition& pos)
: longitude(pos.lon())
, latitude(pos.lat())
{
}
double lon() const { return longitude; }
double lat() const { return latitude; }
void lon(double lon) { longitude = lon; }
void lat(double lat) { latitude = lat; }
void setLon(double lon) { longitude = lon; }
void setLat(double lat) { latitude = lat; }
};
/**
* @brief ostream operator für GeoPosition (Debug/Logging)
*/
inline std::ostream& operator<<(std::ostream& os, const GeoPosition& pos)
{
os << "GeoPosition(lon=" << pos.lon() << ", lat=" << pos.lat() << ", alt=" << pos.z() << ")";
return os;
}
/**
* @brief ostream operator für GeoPosition2D (Debug/Logging)
*/
inline std::ostream& operator<<(std::ostream& os, const GeoPosition2D& pos)
{
os << "GeoPosition2D(lon=" << pos.lon() << ", lat=" << pos.lat() << ")";
return os;
}
} // namespace Core
@@ -0,0 +1,13 @@
#pragma once
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
// Für die Migration erstellen wir minimale Forward-Declarations
namespace Core
{
namespace Interface
{
class Dtc;
class Ftc;
} // namespace Interface
} // namespace Core
@@ -0,0 +1,144 @@
/**
* @file core_types.h
* @brief Core DDS-Typen Stubs
*
* Minimalistische Definitionen für DDS-generierte Core-Typen.
*/
#pragma once
#include <string>
#include <vector>
#include <QtCore/QString>
namespace Core
{
/**
* @brief FunctionReplyObject - DDS-Stub für Function Reply Handling
*
* Simuliert QString::arg() Verhalten und sammelt Argumente.
*/
class FunctionReplyObject
{
public:
explicit FunctionReplyObject(int id = -1, const char *str = nullptr)
: m_str(str ? str : std::string())
, m_id(id)
{}
explicit FunctionReplyObject(const char *str)
: m_str(str ? str : std::string())
{}
explicit FunctionReplyObject(int id, const std::string &errStr, const std::vector<std::string> &errArgs)
: m_str(errStr)
, m_args(errArgs)
, m_id(id)
{}
explicit FunctionReplyObject(int id, std::string &&errStr, std::vector<std::string> &&errArgs)
: m_str(std::move(errStr))
, m_args(std::move(errArgs))
, m_id(id)
{}
explicit FunctionReplyObject(int id, const std::string &errStr, const std::vector<std::string> &errArgs, const std::string &additionalInfo)
: m_str(errStr)
, m_additionalInfo(additionalInfo)
, m_args(errArgs)
, m_id(id)
{}
explicit FunctionReplyObject(int id, std::string &&errStr, std::vector<std::string> &&errArgs, std::string &&additionalInfo)
: m_str(std::move(errStr))
, m_additionalInfo(std::move(additionalInfo))
, m_args(std::move(errArgs))
, m_id(id)
{}
~FunctionReplyObject() = default;
// simulate QString::arg() behaviour
FunctionReplyObject &arg(qint64 val) { (void)val; return *this; }
FunctionReplyObject &arg(const std::string &str) { m_args.push_back(str); return *this; }
FunctionReplyObject &arg(const QString &str) { m_args.push_back(str.toStdString()); return *this; }
/**
* @brief true if the object contains an error description
*/
bool error() const { return !m_str.empty(); }
void setId(int id) { m_id = id; }
FunctionReplyObject &setStr(const char *str) { m_str = str; return *this; }
FunctionReplyObject &setAdditionalInfo(const char *additionalInfo) { m_additionalInfo = additionalInfo; return *this; }
int id() const { return m_id; }
std::string str() const { return m_str; }
std::string additionalInfo() const { return m_additionalInfo; }
std::vector<std::string> args() const { return m_args; }
/**
* @brief convert the error string and arguments to an untranslated std::string
*/
std::string operator()() const { return m_str; }
/**
* @brief convert and translate the error string and arguments to a translated QString
*/
QString translated() const { return QString::fromStdString(m_str); }
int64_t uniqueId() const { return m_uniqueId; }
void setUniqueId(int64_t uniqueId) { m_uniqueId = uniqueId; }
private:
std::string m_str;
std::string m_additionalInfo;
std::vector<std::string> m_args;
int64_t m_uniqueId = 0;
int m_id = -1;
};
/**
* @brief FunctionReply - Stub für DDS Function Reply bei BUILD_RTI=OFF
*
* Minimaler Stub der API-Kompatibilität für request_helper.h bietet.
*/
class FunctionReply
{
public:
FunctionReply() = default;
// Konstruktor für Kompatibilität mit FunctionReplyObject
FunctionReply(int id, const std::string& str, const std::vector<std::string>& args = {}, const std::string& additionalInfo = {})
: m_str(str)
, m_args(args)
, m_additionalInfo(additionalInfo)
, m_id(id)
{}
~FunctionReply() = default;
int id() const { return m_id; }
void setId(int id) { m_id = id; }
std::string str() const { return m_str; }
void setStr(const std::string& str) { m_str = str; }
bool error() const { return !m_str.empty(); }
int64_t uniqueId() const { return m_uniqueId; }
void setUniqueId(int64_t uniqueId) { m_uniqueId = uniqueId; }
std::vector<std::string> args() const { return m_args; }
std::string additionalInfo() const { return m_additionalInfo; }
private:
std::string m_str;
std::vector<std::string> m_args;
std::string m_additionalInfo;
int m_id = -1;
int64_t m_uniqueId = 0;
};
} // namespace Core