Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/include/Core/core.hpp
T
torsten 950d669538 Qt6 Migration: BUILD_RTI guards und CMake fixes
- BUILD_RTI conditional compilation für RTI Connext DDS dependencies
- Namespace fixes in core_dtc.h (Core:: → DDS::Core::)
- CMakeLists.txt: BUILD_RTI option und conditional dependencies
- Handler minelayer: namespace closing mit BUILD_RTI guard
- Build erfolgreich mit BUILD_RTI=OFF validiert

Signed-off-by: Torsten Wierschin <torsten.wierschin@life-maps.com>
2026-08-21 18:37:18 +02:00

107 lines
2.5 KiB
C++

/**
* @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