Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/include/DDS/Generic/generic_data_reader.h
T

91 lines
1.9 KiB
C++

#pragma once
/**
* @file generic_data_reader.h
* @brief Generic Data Reader wrapper for DDS
*
* With BUILD_RTI=ON this forwards to the real implementation in
* Lts/DDS/Generic/. "include/" is searched before "Lts/", so this header
* would otherwise shadow it. With BUILD_RTI=OFF it provides stubs.
*/
#ifdef BUILD_RTI
#include_next <DDS/Generic/generic_data_reader.h>
#else
#include <string>
namespace DDSGeneric
{
// BUILD_RTI=OFF: Provide minimal stub definitions
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
// GenericDataReader stub template
template<typename T>
class GenericDataReader {
public:
using DataType = T;
// Minimal stub methods - extend as needed
bool has_data() const { return false; }
T read_data() { return T{}; }
void cleanup() {}
};
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