BUILD_RTI conditional fixes and Qt6 API updates
- 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>
This commit is contained in:
2065 files changed
+48219
-1763
No files matched your search
@@ -1,17 +1,32 @@
|
||||
|
||||
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* DDS specific parts for a session
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-02-27
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
// Full DDS implementation
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QUrl>
|
||||
#include <memory>
|
||||
#include <DDS/Core/core_dtc_types.h>
|
||||
|
||||
//#include <NGLLogger/INGLLogger.h>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <Common/ProjectConfig/project_defines.h>
|
||||
#include "ltssessiondatadds_export.h"
|
||||
#include <Lts/Common/ProjectConfig/project_defines.h>
|
||||
#include <LtsSession/ltssessiondatadds_export.h>
|
||||
#else
|
||||
// Stub implementation when BUILD_RTI=OFF
|
||||
#include "lts_session_data_dds_stub.h"
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
|
||||
|
||||
namespace DataPluginBase { class Interface; }
|
||||
@@ -83,12 +98,12 @@ struct DdsConnectionParams
|
||||
class Fetcher;
|
||||
|
||||
|
||||
class LTSSESSIONDATADDS_EXPORT LtsSessionDataDds
|
||||
class LTSSESSIONDATADDS_EXPORT LtsSessionDataDds /* FIXME: Name ist irrefuehrend. "LtsSessionData" hat mit "LtsSessionDataDds" nichts zu tun, klingen aber fast identisch. */
|
||||
: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
|
||||
// only used from LtsSession, no direct instantiation
|
||||
explicit LtsSessionDataDds(QObject *parent = nullptr);
|
||||
public:
|
||||
~LtsSessionDataDds();
|
||||
@@ -115,7 +130,7 @@ public:
|
||||
|
||||
qint64 partitionTime() const { return m_curMSecSinceEpoch; }
|
||||
|
||||
|
||||
// retrieve DTC/FTC inside DataPlugin::createDataInterface()
|
||||
template<typename T>
|
||||
bool createTopicClient(std::shared_ptr<T> &member, bool bEnableAll = false, bool bGlobal = false)
|
||||
{
|
||||
@@ -123,7 +138,7 @@ public:
|
||||
if ( bEnableAll && !member->enableAll())
|
||||
{
|
||||
member = nullptr;
|
||||
ERROR_LOG() << "Error initializing dtc/ftc for service " << T::identifier();
|
||||
ERROR_LOG(m_logger) << "Error initializing dtc/ftc for service " << T::identifier();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -138,7 +153,7 @@ public:
|
||||
{
|
||||
dtc = nullptr;
|
||||
ftc = nullptr;
|
||||
ERROR_LOG() << "Error initializing dtc/ftc for service " << T::identifier();
|
||||
ERROR_LOG(m_logger) << "Error initializing dtc/ftc for service " << T::identifier();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -157,12 +172,12 @@ public:
|
||||
}
|
||||
}
|
||||
val.reset();
|
||||
DEBUG_LOG() << "Trying to load dtc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
|
||||
DEBUG_LOG(m_logger) << "Trying to load dtc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
|
||||
<< ", m_dataPluginInterfaces.size() = " << m_dataPluginInterfaces.size() << " - " << this;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// TODO: merge with getDtc() --> std::is_same, std::enable_if
|
||||
template<typename T, typename S>
|
||||
bool getFtc(std::shared_ptr<S> &val) const
|
||||
{
|
||||
@@ -176,17 +191,17 @@ public:
|
||||
}
|
||||
}
|
||||
val.reset();
|
||||
DEBUG_LOG() << "Trying to load ftc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
|
||||
DEBUG_LOG(m_logger) << "Trying to load ftc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
|
||||
<< ", m_dataPluginInterfaces.size() = " << m_dataPluginInterfaces.size() << " - " << this;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: merge with getDtc() --> std::is_same, std::enable_if
|
||||
template<typename T, typename S>
|
||||
bool getForeignDataInterface(std::shared_ptr<S> &val) const
|
||||
{
|
||||
|
||||
//qWarning() << "getForeignDataInterface is deprecated! get the plugin's dtc/ftc directly with getDtc or getFtc!";
|
||||
|
||||
for (const auto &i : m_dataPluginInterfaces)
|
||||
{
|
||||
@@ -198,34 +213,34 @@ public:
|
||||
}
|
||||
}
|
||||
val.reset();
|
||||
DEBUG_LOG() << "Trying to load foreign data ifc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
|
||||
DEBUG_LOG(m_logger) << "Trying to load foreign data ifc " << typeid(T).name() << " - " << typeid(S).name() << " failed!"
|
||||
<< ", m_dataPluginInterfaces.size() = " << m_dataPluginInterfaces.size() << " - " << this;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename S>
|
||||
bool getForeignDataInterface_NEW(std::shared_ptr<S> &val) const
|
||||
{
|
||||
|
||||
|
||||
for (const auto &i : m_dataPluginInterfaces)
|
||||
{
|
||||
val = std::dynamic_pointer_cast<S>(i);
|
||||
if (val)
|
||||
return true;
|
||||
}
|
||||
val.reset();
|
||||
DEBUG_LOG() << "Trying to load foreign data ifc " << typeid(S).name() << " failed!"
|
||||
<< ", m_guiPluginInterfaces.size() = " << m_guiPluginInterfaces.size() << " - " << this;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/* MWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMW */
|
||||
/* MW DEPRECATED - DO NOT USE IN NEW IMPLEMENTATIONS - CAN BE REMOVED AT ANY TIME WITHOUT WARNING ! MW */
|
||||
/* MWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMW */
|
||||
/* MW */ /* MW */
|
||||
/* MW */ template<typename S> /* MW */
|
||||
/* MW */ bool getForeignDataInterface_NEW(std::shared_ptr<S> &val) const /* MW */
|
||||
/* MW */ { /* MW */
|
||||
/* MW */ //qWarning() << "getForeignDataInterface is deprecated! get the plugin's dtc/ftc directly with getDtc or getFtc!"; /* MW */
|
||||
/* MW */ /* MW */
|
||||
/* MW */ for (const auto &i : m_dataPluginInterfaces) /* MW */
|
||||
/* MW */ { /* MW */
|
||||
/* MW */ val = std::dynamic_pointer_cast<S>(i); /* MW */
|
||||
/* MW */ if (val) /* MW */
|
||||
/* MW */ return true; /* MW */
|
||||
/* MW */ } /* MW */
|
||||
/* MW */ val.reset(); /* MW */
|
||||
/* MW */ DEBUG_LOG(m_logger) << "Trying to load foreign data ifc " << typeid(S).name() << " failed!" /* MW */
|
||||
/* MW */ << ", m_guiPluginInterfaces.size() = " << m_guiPluginInterfaces.size() << " - " << this; /* MW */
|
||||
/* MW */ return false; /* MW */
|
||||
/* MW */ } /* MW */
|
||||
/* MW */ /* MW */
|
||||
/* MWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMWMW */
|
||||
|
||||
|
||||
template<typename S>
|
||||
@@ -238,14 +253,14 @@ public:
|
||||
return true;
|
||||
}
|
||||
val.reset();
|
||||
DEBUG_LOG() << "Cannot find foreign gui ifc " << typeid(S).name() << " in " << toString();
|
||||
DEBUG_LOG(m_logger) << "Cannot find foreign gui ifc " << typeid(S).name() << " in " << toString();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template<typename T, typename S>
|
||||
bool interfaceFromGui(std::shared_ptr<S> &val) const
|
||||
bool interfaceFromGui(std::shared_ptr<S> &val) const // for generic gui interfaces
|
||||
{
|
||||
for (const auto &i : m_guiPluginInterfaces)
|
||||
{
|
||||
@@ -254,7 +269,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
val.reset();
|
||||
DEBUG_LOG() << "Trying to load foreign gui ifc #2 " << typeid(S).name() << " failed!"
|
||||
DEBUG_LOG(m_logger) << "Trying to load foreign gui ifc #2 " << typeid(S).name() << " failed!"
|
||||
<< ", m_guiPluginInterfaces.size() = " << m_guiPluginInterfaces.size() << " - " << this;
|
||||
return false;
|
||||
}
|
||||
@@ -285,6 +300,7 @@ protected:
|
||||
QMap<QString, std::shared_ptr<GuiPluginBase::Interface>> m_initializeThesePlugins;
|
||||
Fetcher *m_fetcher;
|
||||
QStringList m_qosFileList;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
|
||||
@@ -305,12 +321,13 @@ public:
|
||||
bool m_errors;
|
||||
QString m_caller;
|
||||
QString m_whatWillNotWork;
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool m_optional;
|
||||
QString m_resultType;
|
||||
QString m_getterFunctionType;
|
||||
|
||||
template <typename ForeignGuiInterface>
|
||||
void getForeignGuiInterface(std::shared_ptr<ForeignGuiInterface> &foreignGuiInterface, const QString &whatWillNotWork , bool optional)
|
||||
void getForeignGuiInterface(std::shared_ptr<ForeignGuiInterface> &foreignGuiInterface, const QString &whatWillNotWork /* only fill if optional */, bool optional)
|
||||
{
|
||||
if (!m_sessionDataDds->getForeignGuiInterface(foreignGuiInterface))
|
||||
{
|
||||
@@ -335,13 +352,15 @@ public:
|
||||
|
||||
if (m_optional)
|
||||
{
|
||||
INFO_LOG() << msg.arg(m_caller, m_resultType, m_sessionDataDds->toString(), QStringLiteral("' - optional but %1 will not work").arg(m_whatWillNotWork));
|
||||
INFO_LOG(m_logger) << msg.arg(m_caller, m_resultType, m_sessionDataDds->toString(), QStringLiteral("' - optional but %1 will not work").arg(m_whatWillNotWork));
|
||||
}
|
||||
else
|
||||
else // critical
|
||||
{
|
||||
ERROR_LOG() << msg.arg(m_caller, m_resultType, m_sessionDataDds->toString(), QStringLiteral(" which is required"));
|
||||
ERROR_LOG(m_logger) << msg.arg(m_caller, m_resultType, m_sessionDataDds->toString(), QStringLiteral(" which is required"));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace LtsSession
|
||||
|
||||
#endif // BUILD_RTI
|
||||
Reference in new issue
Block a user