#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 #else #include 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 class DataReaderImpl { // Empty stub implementation }; } // namespace detail // Forward declaration stub for DataReader // Must match RTI 7.7 signature for compatibility template 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 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 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