diff --git a/qt6-after/qt6-migrated-legatus/.envrc b/qt6-after/qt6-migrated-legatus/.envrc new file mode 100644 index 000000000..368a96d91 --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/.envrc @@ -0,0 +1,4 @@ +# export MIGRATE_PIPELINE_ROOT="/home/torsten/sandbox/qt6-migration-pipeline" +export MIGRATE_PIPELINE_ROOT="Passe Deinen Pfad an." +export LANG=C.UTF-8 +export LC_ALL=C.UTF-8 \ No newline at end of file diff --git a/qt6-after/qt6-migrated-legatus/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/CMakeLists.txt index 580d4d32a..15054b071 100755 --- a/qt6-after/qt6-migrated-legatus/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/CMakeLists.txt @@ -96,7 +96,7 @@ include_directories(${CMAKE_BINARY_DIR}/Lts/Common/LtsUtils/LtsUtilsCore) include_directories(${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap) include_directories(${CMAKE_SOURCE_DIR}/include/OperatorManagement) include_directories(${CMAKE_SOURCE_DIR}/include/FileManagement) -include_directories(${CMAKE_SOURCE_DIR}/forward-declarations) +include_directories(${CMAKE_SOURCE_DIR}/../../../forward-declarations) SET(CMAKE_CXX_STANDARD 17) SET(CMAKE_CXX_STANDARD_REQUIRED ON) SET(CMAKE_VISIBILITY_INLINES_HIDDEN ON) diff --git a/qt6-after/qt6-migrated-legatus/aes_dtc.h b/qt6-after/qt6-migrated-legatus/aes_dtc.h deleted file mode 100644 index bbaea9378..000000000 --- a/qt6-after/qt6-migrated-legatus/aes_dtc.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert -// Für die Migration erstellen wir minimale Forward-Declarations - -namespace AreaEffectSimulation -{ -namespace Interface -{ -class Dtc; -class Ftc; -} // namespace Interface -} // namespace AreaEffectSimulation - -// AES Namespace Alias für Test-Kompatibilität -namespace AES -{ -class Dtc; -class Ftc; -} // namespace AES diff --git a/qt6-after/qt6-migrated-legatus/docker_build.sh b/qt6-after/qt6-migrated-legatus/docker_build.sh index 46ee7f500..45c4dfd58 100755 --- a/qt6-after/qt6-migrated-legatus/docker_build.sh +++ b/qt6-after/qt6-migrated-legatus/docker_build.sh @@ -1,13 +1,18 @@ #!/bin/bash set -e -# Load environment variables from .envrc if it exists -if [ -f .envrc ]; then - set -a - source .envrc - set +a +# Check if .envrc exists +if [ ! -f .envrc ]; then + echo "ERROR: .envrc not found in current directory" + echo "Please create .envrc with required environment variables (e.g., MIGRATE_PIPELINE_ROOT)" + exit 1 fi +# Load environment variables from .envrc +set -a +source .envrc +set +a + # Run CMake configuration and build inside Docker docker run --rm \ -e MIGRATE_PIPELINE_ROOT \ diff --git a/qt6-after/qt6-migrated-legatus/generic_dtc.h b/qt6-after/qt6-migrated-legatus/generic_dtc.h deleted file mode 100644 index 9c3aa6d57..000000000 --- a/qt6-after/qt6-migrated-legatus/generic_dtc.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert -// Für die Migration erstellen wir minimale Forward-Declarations - -namespace DDS -{ -namespace Interface -{ -class Dtc; -class Ftc; -} // namespace Interface -} // namespace DDS diff --git a/qt6-after/qt6-migrated-legatus/include/AreaEffectSimulation/aes_dtc.h b/qt6-after/qt6-migrated-legatus/include/AreaEffectSimulation/aes_dtc.h index c56275594..53d8cdb02 100644 --- a/qt6-after/qt6-migrated-legatus/include/AreaEffectSimulation/aes_dtc.h +++ b/qt6-after/qt6-migrated-legatus/include/AreaEffectSimulation/aes_dtc.h @@ -3,120 +3,11 @@ // STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert // Für die Migration erstellen wir minimale Forward-Declarations -#include -#include -#include -#include - -#include - -#include "LtsUtils/LtsUtilsCore/data_modification_enum.h" - namespace AreaEffectSimulation { - -// AesItem-Struct (wird normalerweise von DDS generiert) -struct AesItem -{ - int32_t id() const { return m_id; } - const std::string& name() const { return m_name; } - - int32_t m_id = 0; - std::string m_name; -}; - -inline std::ostream& operator<<(std::ostream& os, const AesItem& item) -{ - os << "AesItem{id=" << item.id() << ", name=" << item.name() << "}"; - return os; -} - -// BCContamination-Struct (wird normalerweise von DDS generiert) -struct BCContamination : public AesItem -{ -}; - -// BoobyTrap-Struct (wird normalerweise von DDS generiert) -struct BoobyTrap : public AesItem -{ -}; - -// OffRouteMine-Struct (wird normalerweise von DDS generiert) -struct OffRouteMine : public AesItem -{ -}; - namespace Interface { - -// Dtc - Data Transfer Component für Area Effect Simulation -// DDS-generierte Klasse mit Signals für AES-Item-Änderungen -class Dtc : public QObject { - Q_OBJECT - -public: - Dtc() = default; - ~Dtc() override = default; - - // Callback registration for AES item changes - void bcContaminations(std::function callback) { - m_bcCallback = callback; - } - - void boobyTraps(std::function callback) { - m_boobyTrapCallback = callback; - } - - void offRouteMines(std::function callback) { - m_offRouteMineCallback = callback; - } - - void aesItems(std::function callback) { - m_aesCallback = callback; - } - - // Trigger methods for STUB testing - void triggerBCContaminationChanged(const BCContamination& item, DataModification modType) { - emit bcContaminationChanged(item, modType); - if (m_bcCallback) { - m_bcCallback(item); - } - } - - void triggerBoobyTrapChanged(const BoobyTrap& item, DataModification modType) { - emit boobyTrapChanged(item, modType); - if (m_boobyTrapCallback) { - m_boobyTrapCallback(item); - } - } - - void triggerOffRouteMineChanged(const OffRouteMine& item, DataModification modType) { - emit offRouteMineChanged(item, modType); - if (m_offRouteMineCallback) { - m_offRouteMineCallback(item); - } - } - - void triggerAesItemChanged(const AesItem& item, DataModification modType) { - emit aesItemChanged(item, modType); - if (m_aesCallback) { - m_aesCallback(item); - } - } - -signals: - void bcContaminationChanged(const BCContamination& item, DataModification modType); - void boobyTrapChanged(const BoobyTrap& item, DataModification modType); - void offRouteMineChanged(const OffRouteMine& item, DataModification modType); - void aesItemChanged(const AesItem& item, DataModification modType); - -private: - std::function m_bcCallback; - std::function m_boobyTrapCallback; - std::function m_offRouteMineCallback; - std::function m_aesCallback; -}; - +class Dtc; class Ftc; } // namespace Interface } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc.h b/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc.h index 437b1e220..e6e1436f2 100644 --- a/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc.h +++ b/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc.h @@ -1,101 +1,20 @@ -/** - * @RDE_HEADER@ - * DTC TypeDefinitions - * $Id$ - * $HeadURL$ - * $Author$ - */ - #pragma once -#include -#include -#include +// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert +// Für die Migration erstellen wir minimale Forward-Declarations -#ifdef BUILD_RTI -// Use actual RTI Connext DDS types -#include -#include -// DataModification enum is provided by LtsUtilsCore/data_modification_enum.h (included above) -#else -// Stub für BUILD_RTI=OFF - keine RTI Connext DDS Verfügbarkeit -// Diese Header ermöglicht Kompilierung ohne RTI DDS Dependencies -// DataModification enum is still provided by LtsUtilsCore/data_modification_enum.h - -// Forward declarations für DDS-Typen (Stubs) -namespace dds { -namespace sub { - template - struct LoanedSamples { - // Minimaler Stub - keine Implementierung für BUILD_RTI=OFF - }; - - struct SampleInfo { - // Minimaler Stub - keine Implementierung für BUILD_RTI=OFF - }; -} -} -#endif - -namespace NGLLogger +namespace DDS { -class INGLLogger; -} - namespace DTC { -class SubscriberListener; +class Dtc; +class Ftc; +} // namespace DTC +} // namespace DDS -// DataModification Enum is provided by LtsUtilsCore/data_modification_enum.h -// Do NOT redefine here - use the one from LtsUtilsCore - -// uses DRO (static) -template -class GenericDtcSC +// Generic Namespace für generische DDS-Typen +namespace Generic { -public: - using DataReaderObject = DRO_OBJECT; - using SubscriberCallback = SC; - using TopicType = typename DRO_OBJECT::TopicType; - - GenericDtcSC() = default; - virtual ~GenericDtcSC() = default; - - virtual bool setSubscriberCallback(const SubscriberCallback &subscriberCallback) = 0; - virtual dds::sub::LoanedSamples readAlive() const = 0; - virtual dds::sub::LoanedSamples takeAlive() const = 0; - virtual dds::sub::LoanedSamples takeDisposed() const = 0; - virtual bool hasSamples() const = 0; - virtual DataReaderObject *dataReader() const = 0; - virtual bool waitForHistoricalData(int timeoutMSec) = 0; -}; - - -// Typed topic callback (DataReader) -template -class GenericDtc - : public GenericDtcSC > -{}; - -// Typed topic callback (DataReader) with SampleInfo -template -class GenericDtcSampleInfo - : public GenericDtcSC > -{}; - -// Dynamic topic callback (DynamicDataReader) -template -class Ddtc - : public GenericDtcSC > -{}; - -// Dynamic topic callback (DynamicDataReader) with SampleInfo -template -class DdtcSampleInfo - : public GenericDtcSC > -{}; -} \ No newline at end of file +class Dtc; +class Ftc; +} // namespace Generic diff --git a/qt6-after/qt6-migrated-legatus/include/DDS/generic_dtc.h b/qt6-after/qt6-migrated-legatus/include/DDS/generic_dtc.h index 9c3aa6d57..e6e1436f2 100644 --- a/qt6-after/qt6-migrated-legatus/include/DDS/generic_dtc.h +++ b/qt6-after/qt6-migrated-legatus/include/DDS/generic_dtc.h @@ -5,9 +5,16 @@ namespace DDS { -namespace Interface +namespace DTC { class Dtc; class Ftc; -} // namespace Interface +} // namespace DTC } // namespace DDS + +// Generic Namespace für generische DDS-Typen +namespace Generic +{ +class Dtc; +class Ftc; +} // namespace Generic diff --git a/qt6-after/qt6-migrated-legatus/include/DDS/taboc_dtc.h b/qt6-after/qt6-migrated-legatus/include/DDS/taboc_dtc.h deleted file mode 100644 index 5e5e69eb8..000000000 --- a/qt6-after/qt6-migrated-legatus/include/DDS/taboc_dtc.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert -// Für die Migration erstellen wir minimale Forward-Declarations - -namespace TrainingAreaBaseOC -{ -namespace Interface -{ -class Dtc; -class Ftc; -} // namespace Interface -} // namespace TrainingAreaBaseOC diff --git a/qt6-after/qt6-migrated-legatus/include/DTC/generic_dtc.h b/qt6-after/qt6-migrated-legatus/include/DTC/generic_dtc.h deleted file mode 100644 index 9c3aa6d57..000000000 --- a/qt6-after/qt6-migrated-legatus/include/DTC/generic_dtc.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert -// Für die Migration erstellen wir minimale Forward-Declarations - -namespace DDS -{ -namespace Interface -{ -class Dtc; -class Ftc; -} // namespace Interface -} // namespace DDS diff --git a/qt6-after/qt6-migrated-legatus/include/ProjectDataManagement/pdm_operator_rights.h b/qt6-after/qt6-migrated-legatus/include/ProjectDataManagement/pdm_operator_rights.h new file mode 100644 index 000000000..63929e2fc --- /dev/null +++ b/qt6-after/qt6-migrated-legatus/include/ProjectDataManagement/pdm_operator_rights.h @@ -0,0 +1,34 @@ + +/** +* Operator Rights definitions +*/ + +// warning: this file is generated with command +// Lts/Common/CodeGen/codegen_simple.py ALL Lts/Services/ProjectDataManagement/pdm_service.xml build/Lts/Services/ProjectDataManagement/ +// at Sun Sep 6 18:00:15 2026 +// it will be overwritten by next run - do not modify! + +#pragma once + +namespace ProjectDataManagement +{ + static const int Offset = 29; +} + +namespace OperatorRights +{ +enum Charges +{ + ChargeVisibilityEdit = 0x1d010001, +}; + +enum Groups_ProjectDataManagement +{ + GroupChargeVisibility = 0x1d010000, +}; + +enum Plugins_ProjectDataManagement +{ + PluginCharges = 0x1d010000, +}; +} // namespace OperatorRights diff --git a/qt6-after/qt6-migrated-legatus/pdm_operator_rights.cpp b/qt6-after/qt6-migrated-legatus/pdm_operator_rights.cpp deleted file mode 100644 index d467d6aa2..000000000 --- a/qt6-after/qt6-migrated-legatus/pdm_operator_rights.cpp +++ /dev/null @@ -1,24 +0,0 @@ - -/** -* Operator Rights (source) definitions -*/ - -// warning: this file is generated with command -// Lts/Common/CodeGen/codegen_simple.py ALL Lts/Services/ProjectDataManagement/pdm_service.xml build/Lts/Services/ProjectDataManagement/ -// at Sun Sep 6 18:00:15 2026 -// it will be overwritten by next run - do not modify! - -#include "pdm_operator_rights.h" -#include - - - -void doNothing() -{ - const char * txt[] { - QT_TRANSLATE_NOOP("OperatorRights", "Charge Visibility"), - QT_TRANSLATE_NOOP("OperatorRights", "Charge Visibility"), - QT_TRANSLATE_NOOP("OperatorRights", "Edit Charge Visibility"), - }; - Q_UNUSED(txt); -} diff --git a/qt6-after/qt6-migrated-legatus/taboc_dtc.h b/qt6-after/qt6-migrated-legatus/taboc_dtc.h deleted file mode 100644 index 5e5e69eb8..000000000 --- a/qt6-after/qt6-migrated-legatus/taboc_dtc.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert -// Für die Migration erstellen wir minimale Forward-Declarations - -namespace TrainingAreaBaseOC -{ -namespace Interface -{ -class Dtc; -class Ftc; -} // namespace Interface -} // namespace TrainingAreaBaseOC