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:
1200 files changed
+20421
-18259
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
// Stub header for BUILD_RTI=OFF
|
||||
// Original ddsconnector_export.h is generated by CMake when BUILD_RTI=ON
|
||||
|
||||
// For BUILD_RTI=OFF, we don't need DLL export/import macros
|
||||
// Define DDSCONNECTOR_EXPORT as empty
|
||||
#ifndef DDSCONNECTOR_EXPORT
|
||||
#define DDSCONNECTOR_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DDSCONNECTOR_NO_EXPORT
|
||||
#define DDSCONNECTOR_NO_EXPORT
|
||||
#endif
|
||||
|
||||
// Static library marker (not used for BUILD_RTI=OFF)
|
||||
#ifndef DDSCONNECTOR_STATIC_DEFINE
|
||||
#define DDSCONNECTOR_STATIC_DEFINE
|
||||
#endif
|
||||
|
||||
// Deprecated marker (optional, can be empty)
|
||||
#ifndef DDSCONNECTOR_DEPRECATED
|
||||
#define DDSCONNECTOR_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef DDSCONNECTOR_DEPRECATED_EXPORT
|
||||
#define DDSCONNECTOR_DEPRECATED_EXPORT DDSCONNECTOR_DEPRECATED DDSCONNECTOR_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DDSCONNECTOR_DEPRECATED_NO_EXPORT
|
||||
#define DDSCONNECTOR_DEPRECATED_NO_EXPORT DDSCONNECTOR_DEPRECATED DDSCONNECTOR_NO_EXPORT
|
||||
#endif
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
// Stub header for BUILD_RTI=OFF
|
||||
// Original ddsgen_export.h comes from RTI Connext DDS code generation
|
||||
|
||||
// For BUILD_RTI=OFF, we don't need DLL export/import macros
|
||||
// Define DDSGEN_EXPORT as empty
|
||||
#ifndef DDSGEN_EXPORT
|
||||
#define DDSGEN_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DDSGEN_NO_EXPORT
|
||||
#define DDSGEN_NO_EXPORT
|
||||
#endif
|
||||
|
||||
// Static library marker (not used for BUILD_RTI=OFF)
|
||||
#ifndef DDSGEN_STATIC_DEFINE
|
||||
#define DDSGEN_STATIC_DEFINE
|
||||
#endif
|
||||
|
||||
// Deprecated marker (optional, can be empty)
|
||||
#ifndef DDSGEN_DEPRECATED
|
||||
#define DDSGEN_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef DDSGEN_DEPRECATED_EXPORT
|
||||
#define DDSGEN_DEPRECATED_EXPORT DDSGEN_DEPRECATED DDSGEN_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DDSGEN_DEPRECATED_NO_EXPORT
|
||||
#define DDSGEN_DEPRECATED_NO_EXPORT DDSGEN_DEPRECATED DDSGEN_NO_EXPORT
|
||||
#endif
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
// Stub header for BUILD_RTI=OFF
|
||||
// Original generic_base.h uses RTI Connext DDS types
|
||||
|
||||
#include <string>
|
||||
#include <ddsgen_export.h>
|
||||
#include <QMetaMethod>
|
||||
|
||||
// Forward declarations for Qt types used in getMethod
|
||||
class QObject;
|
||||
|
||||
// Forward declaration for NGL logger
|
||||
namespace NGL {
|
||||
class INGLLogger;
|
||||
}
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
|
||||
// Template for topic type name - returns empty string for BUILD_RTI=OFF
|
||||
template<typename T>
|
||||
struct topic_type_name {
|
||||
static std::string value() {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
namespace Helper
|
||||
{
|
||||
// Stub implementations for BUILD_RTI=OFF
|
||||
DDSGEN_EXPORT inline std::string getFunctionTopicName(const std::string &fqName) {
|
||||
return fqName;
|
||||
}
|
||||
|
||||
DDSGEN_EXPORT inline std::string getShortTopicName(const std::string &fqName) {
|
||||
return fqName;
|
||||
}
|
||||
|
||||
// Stub for getMethod - returns default-constructed QMetaMethod
|
||||
DDSGEN_EXPORT inline QMetaMethod getMethod(NGL::INGLLogger & /*logger*/,
|
||||
QObject * /*objectToInform*/,
|
||||
const char * /*slotToExecute*/,
|
||||
const char * /*signalSignature*/,
|
||||
bool /*bWarnOnEmptySlot*/ = true) {
|
||||
// Stub implementation - returns default QMetaMethod
|
||||
return QMetaMethod();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace DDS
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @file generic_data_reader.h
|
||||
* @brief Generic Data Reader wrapper for DDS
|
||||
*
|
||||
* Provides GenericDataReader template class that wraps RTI DataReader
|
||||
* when BUILD_RTI=ON, or provides stub implementation when BUILD_RTI=OFF.
|
||||
*/
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
// RTI DDS is available - include full implementation from Lts
|
||||
// MUST be included BEFORE namespace DDSGeneric to avoid namespace pollution
|
||||
#include <Lts/DDS/Generic/dynamic_data_reader.h>
|
||||
#include <Lts/DDS/Generic/generic_data_reader.h>
|
||||
|
||||
namespace DDSGeneric
|
||||
{
|
||||
// Full implementation is in Lts/DDS/Generic/generic_data_reader.h
|
||||
// This file just provides the include path redirection
|
||||
} // namespace DDSGeneric
|
||||
|
||||
#else
|
||||
// BUILD_RTI=OFF: Provide minimal stub definitions for RTI types
|
||||
|
||||
namespace dds {
|
||||
namespace sub {
|
||||
namespace detail {
|
||||
|
||||
// Dummy delegate class to serve as default template parameter
|
||||
template<typename Q>
|
||||
class DataReaderImpl {
|
||||
// Empty stub implementation
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
// Forward declaration stub for DataReader
|
||||
// Must match RTI 7.7 signature for compatibility
|
||||
template<typename T, template <typename Q> class DELEGATE = detail::DataReaderImpl>
|
||||
class DataReader {
|
||||
public:
|
||||
// Minimal stub interface - add methods as needed by the codebase
|
||||
T read() { return T{}; }
|
||||
void take() {}
|
||||
};
|
||||
|
||||
} // namespace sub
|
||||
} // namespace dds
|
||||
|
||||
namespace DDSGeneric
|
||||
{
|
||||
|
||||
// GenericDataReader stub template (only when BUILD_RTI=OFF)
|
||||
template<typename T>
|
||||
class GenericDataReader {
|
||||
public:
|
||||
using TopicType = T;
|
||||
using TopicTypeRead = T;
|
||||
using DataReader = void*;
|
||||
using DataTopic = void*;
|
||||
using DataReaderQos = void*;
|
||||
using SubscriberCallback = std::function<void(const TopicTypeRead&, int)>;
|
||||
using SubscriberCallbackWithSampleInfo = std::function<void(const TopicTypeRead&, const void*)>;
|
||||
|
||||
GenericDataReader()
|
||||
: m_dataReader(nullptr), m_ddsTopic(nullptr), m_bHaveSubscriberCallback(false)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~GenericDataReader()
|
||||
{
|
||||
m_ddsTopic = nullptr;
|
||||
m_dataReader = nullptr;
|
||||
}
|
||||
|
||||
DataReader getDataReader() const
|
||||
{
|
||||
return m_dataReader;
|
||||
}
|
||||
|
||||
bool create(const void* domainParticipant, const void* ddsSubscriber,
|
||||
const std::string& topicName = std::string(),
|
||||
bool bCreateDataReader = true)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool hasSamples() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void* readAlive(bool& bSeenNewSamples)
|
||||
{
|
||||
bSeenNewSamples = false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* takeAlive(bool& bSeenNewSamples)
|
||||
{
|
||||
bSeenNewSamples = false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* takeDisposed()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
template <typename C> bool read(C callbackFunc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void setHaveSubscriberCallback(bool bHave)
|
||||
{
|
||||
m_bHaveSubscriberCallback = bHave;
|
||||
}
|
||||
|
||||
std::string topicName() const
|
||||
{
|
||||
return std::string();
|
||||
}
|
||||
|
||||
DataReader dataReader() const
|
||||
{
|
||||
return m_dataReader;
|
||||
}
|
||||
|
||||
virtual void recreateReader()
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
DataReader m_dataReader;
|
||||
DataReaderQos m_dataReaderQos;
|
||||
DataTopic m_ddsTopic;
|
||||
bool m_bHaveSubscriberCallback;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class GenericDataReaderContentFilter {
|
||||
public:
|
||||
using DataType = T;
|
||||
// Minimal stub - extend as needed
|
||||
};
|
||||
|
||||
// DynamicDataReader stub for BUILD_RTI=OFF
|
||||
class DynamicDataReader {
|
||||
public:
|
||||
using TopicType = void*;
|
||||
using DataReader = void*;
|
||||
using DataTopic = void*;
|
||||
|
||||
DynamicDataReader() {}
|
||||
~DynamicDataReader() {}
|
||||
|
||||
bool create(const void* domainParticipant, const void* ddsSubscriber,
|
||||
const std::string& specialTopicName, const void* structType)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool hasSamples() const { return false; }
|
||||
};
|
||||
|
||||
} // namespace DDSGeneric
|
||||
|
||||
#endif // BUILD_RTI
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
// Real implementation with RTI NGL logger
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <ddsgen_export.h>
|
||||
#include <string>
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
|
||||
enum class DataType
|
||||
{
|
||||
DATA_TYPE_UNKNOWN = 0,
|
||||
|
||||
DATA_WRITER = 1,
|
||||
DATA_READER = 2,
|
||||
|
||||
DYNAMIC_DATA_WRITER = 3,
|
||||
DYNAMIC_DATA_READER = 4,
|
||||
|
||||
DATA_TOPIC_SERVER = 8,
|
||||
DATA_TOPIC_CLIENT = 9,
|
||||
|
||||
FUNCTION_TOPIC_SERVER = 12,
|
||||
FUNCTION_TOPIC_CLIENT = 13
|
||||
};
|
||||
|
||||
using LOGGER_T = NGL::INGLLogger&;
|
||||
|
||||
DDSGEN_EXPORT LOGGER_T getLogger(const char *name, DataType dt);
|
||||
inline LOGGER_T getLogger(const std::string &loggerName, DataType dt)
|
||||
{
|
||||
return getLogger(loggerName.data(), dt);
|
||||
}
|
||||
|
||||
} // namespace DDS
|
||||
#else
|
||||
// Stub header for BUILD_RTI=OFF
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <ddsgen_export.h>
|
||||
#include <string>
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
|
||||
// DataType enum - same as original, no RTI dependency
|
||||
enum class DataType
|
||||
{
|
||||
DATA_TYPE_UNKNOWN = 0,
|
||||
|
||||
DATA_WRITER = 1,
|
||||
DATA_READER = 2,
|
||||
|
||||
DYNAMIC_DATA_WRITER = 3,
|
||||
DYNAMIC_DATA_READER = 4,
|
||||
|
||||
DATA_TOPIC_SERVER = 8,
|
||||
DATA_TOPIC_CLIENT = 9,
|
||||
|
||||
FUNCTION_TOPIC_SERVER = 12,
|
||||
FUNCTION_TOPIC_CLIENT = 13
|
||||
};
|
||||
|
||||
// Logger type alias
|
||||
using LOGGER_T = NGL::INGLLogger&;
|
||||
|
||||
// Stub implementation for getLogger
|
||||
// Returns a dummy logger reference - in real usage, this would need proper initialization
|
||||
DDSGEN_EXPORT inline LOGGER_T getLogger(const char *name, DataType dt) {
|
||||
// Stub: return a static dummy logger
|
||||
// In production code with BUILD_RTI=OFF, this should be replaced with actual logger
|
||||
static NGL::INGLLogger* dummy_logger = nullptr;
|
||||
return *dummy_logger;
|
||||
}
|
||||
|
||||
// Inline overload for std::string
|
||||
inline LOGGER_T getLogger(const std::string &loggerName, DataType dt)
|
||||
{
|
||||
return getLogger(loggerName.data(), dt);
|
||||
}
|
||||
|
||||
} // namespace DDS
|
||||
#endif
|
||||
Reference in new issue
Block a user