Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Common/LtsSession/lts_session_lock_handler.cpp
T
2026-10-03 09:20:13 +02:00

96 lines
2.2 KiB
C++

#include "lts_session_lock_handler.h"
#include <QtCore/QDebug>
namespace LtsSession
{
// STUB implementations - RTI Connext DDS not available.
// The topic-lock feature depends on the RTI DDS backend (Core::Interface::Ftc),
// which is an optional dependency not present in this build. These definitions
// exist so that LtsSession links; the moc-generated qt_metacall references every
// slot, so each slot needs a body. Semantics reflect an unavailable backend:
// init reports failure (the caller logs a warning and skips wiring the handler)
// and the handler is never locked.
TopicLockHandler::TopicLockHandler()
: m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("LtsSession.TopicLockHandler"))
{
}
TopicLockHandler::~TopicLockHandler() {}
bool TopicLockHandler::init(const std::shared_ptr<Core::Interface::Ftc> &coreFtc, int exerciseId)
{
Q_UNUSED(coreFtc);
Q_UNUSED(exerciseId);
return false; // RTI DDS backend unavailable
}
void TopicLockHandler::slotTryLock(const LtsWidgets::TopicInfo &topicInfo)
{
Q_UNUSED(topicInfo);
}
bool TopicLockHandler::slotUnlock()
{
return true; // nothing is locked (no DDS backend)
}
void TopicLockHandler::slotFinalize() {}
bool TopicLockHandler::lock()
{
return false; // no DDS backend to lock against
}
bool TopicLockHandler::unlock()
{
return true; // nothing to unlock
}
std::string TopicLockHandler::objStateAsString() const
{
return "stub (RTI DDS not available)";
}
TopicLockHanderData::TopicLockHanderData() {}
TopicLockHanderData::~TopicLockHanderData() {}
void TopicLockHanderData::init(const std::shared_ptr<Core::Interface::Ftc> &coreFtc, int exerciseId)
{
Q_UNUSED(coreFtc);
Q_UNUSED(exerciseId);
}
void TopicLockHanderData::unlock() {}
void TopicLockHanderData::slotTryLock(const LtsWidgets::TopicInfo &topicInfo)
{
Q_UNUSED(topicInfo);
}
bool TopicLockHanderData::isLocked() const
{
return false; // no DDS backend: never locked
}
LtsWidgets::TopicInfo TopicLockHanderData::getTopicInfo() const
{
return LtsWidgets::TopicInfo();
}
void TopicLockHanderData::slotLock(const QString &lockedBy)
{
m_lockedBy = lockedBy;
}
void TopicLockHanderData::slotUnlock()
{
m_lockedBy.clear();
}
} // namespace LtsSession