- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found - cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed - Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI - Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI - Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals - cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return()) - Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc. - BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
65 lines
1.4 KiB
C++
Executable File
65 lines
1.4 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <dds/core/cond/Condition.hpp>
|
|
#include <dds/core/cond/GuardCondition.hpp>
|
|
#include <dds/core/cond/WaitSet.hpp>
|
|
|
|
#include <future>
|
|
#include <map>
|
|
#include <ddsgen_export.h>
|
|
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
}
|
|
|
|
namespace DDSGeneric
|
|
{
|
|
class DDSGEN_EXPORT WaitSetHandler final
|
|
{
|
|
public:
|
|
class CallbackInterface
|
|
{
|
|
public:
|
|
virtual ~CallbackInterface() = default;
|
|
virtual void dataAvailable() = 0;
|
|
};
|
|
|
|
WaitSetHandler();
|
|
~WaitSetHandler();
|
|
|
|
bool attachWaitSet(const dds::core::cond::Condition &cond, CallbackInterface *cb);
|
|
bool detachWaitSet(const dds::core::cond::Condition &cond, CallbackInterface *cb);
|
|
bool enableWaitSet(const dds::core::cond::Condition &cond, CallbackInterface *cb);
|
|
bool disableWaitSet(const dds::core::cond::Condition &cond, CallbackInterface *cb);
|
|
|
|
int attachedConditionCount() const;
|
|
|
|
private:
|
|
struct WaitSetData final
|
|
{
|
|
dds::core::cond::Condition condition;
|
|
CallbackInterface *callback = nullptr;
|
|
bool enabled = true;
|
|
bool needWaitSetAttach = false;
|
|
|
|
WaitSetData(const dds::core::cond::Condition &cond, CallbackInterface *cb)
|
|
: condition(cond)
|
|
, callback(cb)
|
|
{}
|
|
};
|
|
private:
|
|
void waitSetTask();
|
|
private:
|
|
|
|
dds::core::cond::WaitSet m_waitSet;
|
|
dds::core::cond::GuardCondition m_abortCondition;
|
|
std::future<void> m_task;
|
|
std::mutex m_accessMutex;
|
|
std::map<const DDS_Condition *, WaitSetData> m_waitSetData;
|
|
};
|
|
}
|