Fixes TopicLockMaster Dtc include, namespace and member access
This commit is contained in:
1 parent
15a961182a
commit
f974625b0f
2 files changed
+12
-6
No files matched your search
@@ -28,13 +28,13 @@ bool TopicLockMaster::init(const std::shared_ptr<DDSConnector::DdsConnector> &dd
|
|||||||
m_coreDtc->enableAll();
|
m_coreDtc->enableAll();
|
||||||
|
|
||||||
m_coreDtc->lockedEntitys([this] (const LockedEntity &data) {
|
m_coreDtc->lockedEntitys([this] (const LockedEntity &data) {
|
||||||
m_lockedEntitys << key(data.entityId(), data.exerciseId(), QString::fromStdString(data.entityTypeName()));
|
m_lockedEntitys << key(data.entityId, data.exerciseId, QString::fromStdString(data.entityTypeName));
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_coreDtc.get(), &Interface::Dtc::lockedEntityChanged, this,
|
connect(m_coreDtc.get(), &Interface::Dtc::lockedEntityChanged, this,
|
||||||
[this] (const LockedEntity &data, DataModification modType)
|
[this] (const LockedEntity &data, DataModification modType)
|
||||||
{
|
{
|
||||||
key k(data.entityId(), data.exerciseId(), QString::fromStdString(data.entityTypeName()));
|
key k(data.entityId, data.exerciseId, QString::fromStdString(data.entityTypeName));
|
||||||
if (modType == DataModification::eAdded)
|
if (modType == DataModification::eAdded)
|
||||||
m_lockedEntitys << k;
|
m_lockedEntitys << k;
|
||||||
else if (modType == DataModification::eRemoved)
|
else if (modType == DataModification::eRemoved)
|
||||||
|
|||||||
@@ -7,10 +7,14 @@
|
|||||||
#include <Core/core_export.h>
|
#include <Core/core_export.h>
|
||||||
|
|
||||||
#if BUILD_RTI
|
#if BUILD_RTI
|
||||||
#include <Core/core_dtc.h>
|
// Resolves to the codegen-generated core_dtc.h via the build-dir include
|
||||||
|
// root (build4/Lts). The old <Core/core_dtc.h> spelling hit the migration
|
||||||
|
// stub tree (include/Core/core_dtc.h), whose DDS::Core::Interface forward
|
||||||
|
// declarations don't match the generated Core::Interface::Dtc.
|
||||||
|
#include <DDS/Core/core_dtc.h>
|
||||||
#else
|
#else
|
||||||
// Forward declarations for moc compatibility when BUILD_RTI=OFF
|
// Forward declarations for moc compatibility when BUILD_RTI=OFF
|
||||||
namespace DDS { namespace Core { namespace Interface { class Dtc; } } }
|
namespace Core { namespace Interface { class Dtc; } }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace DDSConnector
|
namespace DDSConnector
|
||||||
@@ -66,14 +70,16 @@ public:
|
|||||||
template<typename E>
|
template<typename E>
|
||||||
bool isLocked(const E &data, int exerciseId)
|
bool isLocked(const E &data, int exerciseId)
|
||||||
{
|
{
|
||||||
auto it = m_lockedEntitys.constFind(key(data.id(), exerciseId, QString::fromStdString(typeid(E).name())));
|
// rtiddsgen -stl generates plain public data members, so the id is
|
||||||
|
// accessed directly instead of the old getter call data.id().
|
||||||
|
auto it = m_lockedEntitys.constFind(key(data.id, exerciseId, QString::fromStdString(typeid(E).name())));
|
||||||
return !(it == m_lockedEntitys.cend());
|
return !(it == m_lockedEntitys.cend());
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSet<key> m_lockedEntitys;
|
QSet<key> m_lockedEntitys;
|
||||||
#if BUILD_RTI
|
#if BUILD_RTI
|
||||||
std::shared_ptr<DDS::Core::Interface::Dtc> m_coreDtc;
|
std::shared_ptr<Core::Interface::Dtc> m_coreDtc;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user