Added test case and setting Test configuration
This commit is contained in:
1 parent
f815271486
commit
a86f9b5bac
48 files changed
+423
-168
No files matched your search
@@ -38,11 +38,7 @@ bool GeneratorGrantleeBase::initInternal(const XmlReader* reader, StructBuilder*
|
||||
m_ctx->insert(QStringLiteral("namespace"), reader->getServiceNamespace());
|
||||
m_ctx->insert(QStringLiteral("namespace_abbr"), reader->getServiceAbbr().toLower());
|
||||
m_ctx->insert(QStringLiteral("namespace_abbr_upper"), reader->getServiceAbbr().toUpper());
|
||||
if (reader->getServiceNamespace() == QLatin1String("Core"))
|
||||
m_ctx->insert(QStringLiteral("include_prefix"),
|
||||
QStringLiteral("DDS/%1").arg(reader->getServiceNamespace()));
|
||||
else
|
||||
m_ctx->insert(QStringLiteral("include_prefix"), reader->getServiceNamespace());
|
||||
m_ctx->insert(QStringLiteral("include_prefix"), reader->getServiceNamespace());
|
||||
m_ctx->insert(QStringLiteral("custom_record_replay"), reader->hasCustomRecordReplayPlugin());
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -61,17 +61,15 @@ QString MemberInformationWrapper::ddsToJsonElement() const
|
||||
if (cppMemberName().isEmpty())
|
||||
return QStringLiteral("obj[QStringLiteral(\"") + cppType() + QStringLiteral("\")] = element;");
|
||||
|
||||
const QString memberAccess = isCppStruct() ? cppMemberName() : cppMemberName() + QStringLiteral("()");
|
||||
// The DDS_PSM_Cxx mapping (see cmake/MacroRTIDDSGen.cmake) gives generated
|
||||
// types accessor methods, so members are always reached via foo().
|
||||
if (!isOptional())
|
||||
return QStringLiteral("obj[QStringLiteral(\"") + cppMemberName() + QStringLiteral("\")] = ") + cppToJsonPre() +
|
||||
QStringLiteral("element.") + memberAccess + cppToJsonPost();
|
||||
QStringLiteral("element.") + cppMemberName() + QStringLiteral("()") + cppToJsonPost();
|
||||
|
||||
const QString optionalAccess =
|
||||
isCppStruct() ? cppMemberName() + QStringLiteral(".is_set()") : cppMemberName() + QStringLiteral("().is_set()");
|
||||
const QString getValue = isCppStruct() ? cppMemberName() : cppMemberName() + QStringLiteral("()");
|
||||
return QStringLiteral("if (element.") + optionalAccess + QStringLiteral(") ") +
|
||||
return QStringLiteral("if (element.") + cppMemberName() + QStringLiteral("().is_set()) ") +
|
||||
QStringLiteral("obj[QStringLiteral(\"") + cppMemberName() + QStringLiteral("\")] = ") + cppToJsonPre() +
|
||||
QStringLiteral("*element.") + getValue + cppToJsonPost();
|
||||
QStringLiteral("element.") + cppMemberName() + QStringLiteral("().get()") + cppToJsonPost();
|
||||
}
|
||||
|
||||
QString MemberInformationWrapper::jsonElementToDds() const
|
||||
@@ -86,12 +84,8 @@ QString MemberInformationWrapper::jsonElementToDds() const
|
||||
if (isOptional())
|
||||
ret += QStringLiteral("if (!val.isNull()) ");
|
||||
|
||||
if (isCppStruct())
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral(" = ") + cppFromJsonPre2() +
|
||||
QStringLiteral("val") + cppFromJsonPost();
|
||||
else
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral("(") + cppFromJsonPre2() +
|
||||
QStringLiteral("val") + cppFromJsonPost() + QStringLiteral(")");
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral("(") + cppFromJsonPre2() +
|
||||
QStringLiteral("val") + cppFromJsonPost() + QStringLiteral(")");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -288,6 +288,8 @@ class FtcGenerator(object):
|
||||
def generate( self, outfile, parser ):
|
||||
outputHeader( outfile, parser, 'FTC' )
|
||||
outfile.write('\n')
|
||||
outfile.write('#include <DDS/FTC/generic_ftc_impl.h>\n')
|
||||
outfile.write('\n')
|
||||
outfile.write('namespace FTC\n')
|
||||
outfile.write('{\n')
|
||||
outfile.write('template <typename REQ, typename REP, typename DUMMY> class GenericFtcImpl;\n')
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
#include <LtsUtilsCore/data_modification_enum.h>
|
||||
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}_export.h>
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}.hpp>
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}_dtc_types.h>
|
||||
|
||||
// Bring Core namespace types into scope for Interface namespace
|
||||
using namespace {{ namespace }};
|
||||
// Bring DTC namespace types into scope for Interface namespace
|
||||
using namespace DTC;
|
||||
|
||||
namespace DDSConnector
|
||||
{
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
{% autoescape off %}
|
||||
// filename: {{ namespace_abbr }}_ftc_impl.h
|
||||
#pragma once
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}_ftc.h>
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}_ftc_types.h>
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}_ftc.h>
|
||||
#include <{{ include_prefix }}/logger.h>
|
||||
|
||||
#include <DDS/FTC/abstract_requester.h>
|
||||
|
||||
@@ -34,6 +34,8 @@ NGL_TARGET_LINK_LIBRARIES(LtsSessionDataDds
|
||||
PUBLIC
|
||||
$<$<BOOL:${BUILD_RTI}>:nddscore>
|
||||
$<$<BOOL:${BUILD_RTI}>:ddsQoS>
|
||||
# fournit dds::topic::topic_type_support<Core::*>::register_type
|
||||
$<$<BOOL:${BUILD_RTI}>:$<IF:$<TARGET_EXISTS:ddscore>,ddscore,>>
|
||||
NGLLogger
|
||||
Qt6::Core
|
||||
)
|
||||
@@ -47,8 +49,10 @@ IF(BUILD_RTI)
|
||||
)
|
||||
# ddscore target generates core_dtc_types.h
|
||||
ADD_DEPENDENCIES(LtsSessionDataDds ddscore)
|
||||
# PUBLIC : nddscore est lie en PUBLIC ci-dessus, donc "-lnddscore" se propage
|
||||
# aux consommateurs ; le repertoire de recherche doit se propager avec lui.
|
||||
NGL_TARGET_LINK_DIRECTORIES(LtsSessionDataDds
|
||||
PRIVATE
|
||||
PUBLIC
|
||||
${RTI_LIB_DIR}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
@@ -183,8 +183,10 @@ class LTSSESSIONDATADDS_EXPORT LtsSessionDataDds : public QObject
|
||||
#ifdef BUILD_RTI
|
||||
bool initInternal();
|
||||
void onPartitionTimeChangedInternal();
|
||||
static LtsSession::PartitionType toPartitionType(IDL::PartitionType idlType);
|
||||
static IDL::PartitionType toIdlPartitionType(LtsSession::PartitionType type);
|
||||
static ::LtsSession::PartitionType toPartitionType(IDL::PartitionType idlType);
|
||||
// NOTE: toIdlPartitionType est une fonction du namespace anonyme dans le .cpp
|
||||
// (partagee avec DdsConnectionContainer), pas un membre. La declarer ici la
|
||||
// masquait dans les methodes de la classe -> reference non definie a l'edition de liens.
|
||||
|
||||
// Member variables - only with RTI
|
||||
int m_exerciseId;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
#include "ltstimelineclassic_export.h"
|
||||
#include "AbstractTimelineModel.h"
|
||||
#include "Range.h"
|
||||
|
||||
@@ -10,7 +11,7 @@
|
||||
namespace LtsTimelineClassic
|
||||
{
|
||||
|
||||
class EventDelegate : public QStyledItemDelegate
|
||||
class LTSTIMELINECLASSIC_EXPORT EventDelegate : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ltstimelineclassic_export.h"
|
||||
#include "EventList.h"
|
||||
#include "LineMap.h"
|
||||
#include "Range.h"
|
||||
@@ -14,7 +15,7 @@ class QStyleOptionViewItem;
|
||||
namespace LtsTimelineClassic
|
||||
{
|
||||
|
||||
class PassiveEventContainer : public QObject
|
||||
class LTSTIMELINECLASSIC_EXPORT PassiveEventContainer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
#include "ltstimelineclassic_export.h"
|
||||
#include "EventTools.h"
|
||||
|
||||
#include <QtWidgets/QHeaderView>
|
||||
@@ -11,7 +12,7 @@ class QPainter;
|
||||
namespace LtsTimelineClassic
|
||||
{
|
||||
|
||||
class TimelineHeaderView : public QHeaderView
|
||||
class LTSTIMELINECLASSIC_EXPORT TimelineHeaderView : public QHeaderView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
#include "ltstimelineclassic_export.h"
|
||||
#include "EventTools.h"
|
||||
#include "LineMap.h"
|
||||
|
||||
@@ -23,7 +24,7 @@ namespace LtsTimelineClassic
|
||||
|
||||
class TimelineIndicatorTest;
|
||||
|
||||
class TimelineIndicator : public QWidget
|
||||
class LTSTIMELINECLASSIC_EXPORT TimelineIndicator : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
#include "ltstimelineclassic_export.h"
|
||||
#include "AbstractTimelineModel.h"
|
||||
#include "LineMap.h"
|
||||
#include "Range.h"
|
||||
@@ -13,7 +14,7 @@
|
||||
namespace LtsTimelineClassic
|
||||
{
|
||||
|
||||
class TimelineView : public QTreeView
|
||||
class LTSTIMELINECLASSIC_EXPORT TimelineView : public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
Reference in new issue
Block a user