MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit fd21eb3f authored by KLOCZKO Thibaud's avatar KLOCZKO Thibaud
Browse files

Adding proxy loop node and related tests.

Populating basic nodes (boolean, integer, ...) and first tests on it.
parent d4fbe21c
......@@ -3,9 +3,9 @@
## Author: Julien Wintz
## Created: Wed Mar 20 12:26:15 2013 (+0100)
## Version:
## Last-Updated: Thu Mar 28 16:42:08 2013 (+0100)
## Last-Updated: Wed Apr 3 11:05:16 2013 (+0200)
## By: Thibaud Kloczko
## Update #: 112
## Update #: 131
######################################################################
##
### Change Log:
......@@ -48,8 +48,8 @@ set(${PROJECT_NAME}_HEADERS
# dtkComposerNodeArrayScalar.h
# dtkComposerNodeArrayScalarExtractor.h
# dtkComposerNodeArrayScalarOperatorModifier.h
# dtkComposerNodeBoolean.h
# dtkComposerNodeBooleanOperator.h
dtkComposerNodeBoolean.h
dtkComposerNodeBooleanOperator.h
dtkComposerNodeComposite.h
# dtkComposerNodeConstants.h
dtkComposerNodeControl.h
......@@ -62,12 +62,12 @@ set(${PROJECT_NAME}_HEADERS
# dtkComposerNodeControlWhile.h
# dtkComposerNodeData.h
# dtkComposerNodeFile.h
# dtkComposerNodeInteger.h
dtkComposerNodeInteger.h
dtkComposerNodeLeaf.h
# dtkComposerNodeLeafData.h
# dtkComposerNodeLeafProcess.h
# dtkComposerNodeLeafView.h
# dtkComposerNodeLogger.h
dtkComposerNodeLogger.h
# dtkComposerNodeMatrixSquareReal.h
# dtkComposerNodeMatrixSquareRealExtractor.h
# dtkComposerNodeMatrixSquareRealOperatorUnary.h
......@@ -79,15 +79,15 @@ set(${PROJECT_NAME}_HEADERS
# dtkComposerNodeMetaVector3DArray.h
# dtkComposerNodeMetaVector3DArrayAppend.h
# dtkComposerNodeMetaVector3DArrayExtractor.h
# dtkComposerNodeNumberOperator.h
dtkComposerNodeNumberOperator.h
# dtkComposerNodeProcess.h
# dtkComposerNodeProxy.h
# dtkComposerNodeQuaternion.h
# dtkComposerNodeQuaternionOperatorUnary.h
# dtkComposerNodeQuaternionOperatorBinary.h
# dtkComposerNodeReal.h
# dtkComposerNodeString.h
# dtkComposerNodeStringOperator.h
dtkComposerNodeReal.h
dtkComposerNodeString.h
dtkComposerNodeStringOperator.h
# dtkComposerNodeVector3D.h
# dtkComposerNodeVector3DOperatorUnary.h
# dtkComposerNodeVector3DOperatorBinary.h
......@@ -128,11 +128,10 @@ set(${PROJECT_NAME}_HEADERS
dtkComposerTransmitterHandler.h
dtkComposerTransmitterHandler.tpp
dtkComposerTransmitterProxy.h
dtkComposerTransmitterProxyLoop.h
dtkComposerTransmitterProxyLoop.tpp
dtkComposerTransmitterReceiver.h
dtkComposerTransmitterReceiver.tpp
# dtkComposerTransmitterVariant.h
# dtkComposerType.h
# dtkComposerVariant.h
# dtkComposerView.h
# dtkComposerReader.h
# dtkComposerWriter.h
......@@ -167,8 +166,8 @@ set(${PROJECT_NAME}_SOURCES
# dtkComposerNodeArrayScalar.cpp
# dtkComposerNodeArrayScalarExtractor.cpp
# dtkComposerNodeArrayScalarOperatorModifier.cpp
# dtkComposerNodeBoolean.cpp
# dtkComposerNodeBooleanOperator.cpp
dtkComposerNodeBoolean.cpp
dtkComposerNodeBooleanOperator.cpp
dtkComposerNodeComposite.cpp
# dtkComposerNodeConstants.cpp
dtkComposerNodeControl.cpp
......@@ -181,12 +180,12 @@ set(${PROJECT_NAME}_SOURCES
# dtkComposerNodeControlWhile.cpp
# dtkComposerNodeData.cpp
# dtkComposerNodeFile.cpp
# dtkComposerNodeInteger.cpp
dtkComposerNodeInteger.cpp
dtkComposerNodeLeaf.cpp
# dtkComposerNodeLeafData.cpp
# dtkComposerNodeLeafProcess.cpp
# dtkComposerNodeLeafView.cpp
# dtkComposerNodeLogger.cpp
dtkComposerNodeLogger.cpp
# dtkComposerNodeMatrixSquareReal.cpp
# dtkComposerNodeMatrixSquareRealExtractor.cpp
# dtkComposerNodeMatrixSquareRealOperatorUnary.cpp
......@@ -198,15 +197,15 @@ set(${PROJECT_NAME}_SOURCES
# dtkComposerNodeMetaVector3DArray.cpp
# dtkComposerNodeMetaVector3DArrayAppend.cpp
# dtkComposerNodeMetaVector3DArrayExtractor.cpp
# dtkComposerNodeNumberOperator.cpp
dtkComposerNodeNumberOperator.cpp
# dtkComposerNodeProcess.cpp
# dtkComposerNodeProxy.cpp
# dtkComposerNodeQuaternion.cpp
# dtkComposerNodeQuaternionOperatorUnary.cpp
# dtkComposerNodeQuaternionOperatorBinary.cpp
# dtkComposerNodeReal.cpp
# dtkComposerNodeString.cpp
# dtkComposerNodeStringOperator.cpp
dtkComposerNodeReal.cpp
dtkComposerNodeString.cpp
dtkComposerNodeStringOperator.cpp
# dtkComposerNodeVector3D.cpp
# dtkComposerNodeVector3DOperatorUnary.cpp
# dtkComposerNodeVector3DOperatorBinary.cpp
......@@ -244,7 +243,7 @@ set(${PROJECT_NAME}_SOURCES
dtkComposerTransmitterEmitter.cpp
dtkComposerTransmitterReceiver.cpp
dtkComposerTransmitterProxy.cpp
# dtkComposerTransmitterVariant.cpp
dtkComposerTransmitterProxyLoop.cpp
# dtkComposerView.cpp
# dtkComposerView.cpp
# dtkComposerReader.cpp
......
......@@ -9,8 +9,15 @@
#include "dtkComposerNodeLeaf.h"
#include "dtkComposerNodeBoolean.h"
#include "dtkComposerNodeBooleanOperator.h"
#include "dtkComposerNodeInteger.h"
#include "dtkComposerNodeLogger.h"
#include "dtkComposerNodeReal.h"
#include "dtkComposerNodeNumberOperator.h"
#include "dtkComposerNodeString.h"
#include "dtkComposerNodeStringOperator.h"
#include "dtkComposerTransmitter.h"
#include "dtkComposerTransmitterEmitter.h"
#include "dtkComposerTransmitterReceiver.h"
#include "dtkComposerTransmitterProxy.h"
#include "dtkComposerTransmitterProxyLoop.h"
#include "dtkComposerTransmitterReceiver.h"
......@@ -4,9 +4,9 @@
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Tue Feb 14 16:49:25 2012 (+0100)
* Version: $Id$
* Last-Updated: Mon Mar 25 09:05:06 2013 (+0100)
* Last-Updated: Tue Apr 2 12:58:25 2013 (+0200)
* By: Thibaud Kloczko
* Update #: 56
* Update #: 61
*/
/* Commentary:
......@@ -28,7 +28,7 @@
class dtkComposerNodeBooleanPrivate
{
public:
dtkComposerTransmitterReceiverVariant receiver;
dtkComposerTransmitterReceiver<bool> receiver;
public:
dtkComposerTransmitterEmitter<bool> emitter;
......@@ -43,15 +43,10 @@ public:
dtkComposerNodeBoolean::dtkComposerNodeBoolean(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeBooleanPrivate)
{
dtkComposerTransmitter::TypeList type_list;
type_list << QMetaType::Bool;// << dtkComposerTypeInfo<int*>::type() << dtkComposerTypeInfo<uint*>::type()
//<< dtkComposerTypeInfo<qlonglong*>::type() << dtkComposerTypeInfo<double*>::type() << dtkComposerTypeInfo<QString*>::type();
d->receiver.setTypeList(type_list);
this->appendReceiver(&d->receiver);
this->appendEmitter(&d->emitter);
d->value = false;
this->appendEmitter(&d->emitter);
}
dtkComposerNodeBoolean::~dtkComposerNodeBoolean(void)
......@@ -64,7 +59,7 @@ dtkComposerNodeBoolean::~dtkComposerNodeBoolean(void)
void dtkComposerNodeBoolean::run(void)
{
if (!d->receiver.isEmpty())
d->value = (d->receiver.data<bool>());
d->value = (d->receiver.data());
d->emitter.setData(d->value);
}
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Mon Feb 27 12:38:46 2012 (+0100)
* Version: $Id$
* Last-Updated: 2013 Mon Jan 14 12:32:24 (+0100)
* Last-Updated: Tue Apr 2 12:58:08 2013 (+0200)
* By: Thibaud Kloczko
* Update #: 81
* Update #: 86
*/
/* Commentary:
......@@ -28,7 +28,7 @@
class dtkComposerNodeIntegerPrivate
{
public:
dtkComposerTransmitterVariant receiver;
dtkComposerTransmitterReceiver<qlonglong> receiver;
public:
dtkComposerTransmitterEmitter<qlonglong> emitter;
......@@ -43,15 +43,10 @@ public:
dtkComposerNodeInteger::dtkComposerNodeInteger(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeIntegerPrivate)
{
QVector<const dtkComposerType*> variant_list;
variant_list << dtkComposerTypeInfo<int*>::type() << dtkComposerTypeInfo<uint*>::type() << dtkComposerTypeInfo<qlonglong>::type() << dtkComposerTypeInfo<qulonglong*>::type()
<< dtkComposerTypeInfo<bool*>::type() << dtkComposerTypeInfo<QString*>::type() << dtkComposerTypeInfo<double*>::type();
d->receiver.setDataTypes(variant_list);
this->appendReceiver(&(d->receiver));
this->appendEmitter(&(d->emitter));
d->value = 0;
this->appendEmitter(&(d->emitter));
}
dtkComposerNodeInteger::~dtkComposerNodeInteger(void)
......@@ -64,7 +59,7 @@ dtkComposerNodeInteger::~dtkComposerNodeInteger(void)
void dtkComposerNodeInteger::run(void)
{
if (!d->receiver.isEmpty())
d->value = d->receiver.data<qlonglong>();
d->value = d->receiver.data();
d->emitter.setData(d->value);
}
......
......@@ -15,14 +15,23 @@
#include "dtkComposerNodeLogger.h"
#include "dtkComposerTransmitterReceiver.h"
#include "dtkComposerTransmitterVariant.h"
#include <dtkLog/dtkLog.h>
#include <dtkLog>
// ///////////////////////////////////////////////////////////////////
// Log categories
// ///////////////////////////////////////////////////////////////////
DTK_LOG_CATEGORY(FR_INRIA_DTK_COMPOSER_LOGGER, "fr.inria.dtk.composer.logger")
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
class dtkComposerNodeLoggerPrivate
{
public:
dtkComposerTransmitterVariant receiver;
dtkComposerTransmitterReceiverVariant receiver;
dtkComposerTransmitterReceiver<QString> receiver_header;
dtkComposerTransmitterReceiver<QString> receiver_level;
......@@ -44,37 +53,47 @@ dtkComposerNodeLogger::~dtkComposerNodeLogger(void)
void dtkComposerNodeLogger::run(void)
{
QStringList descriptions = d->receiver.allDataDescription();
QStringList identifiers = d->receiver.allDataIdentifier();
QVariantList list = d->receiver.allData();
QStringList identifiers;
QStringList descriptions;
QString str;
foreach (QVariant v, list) {
identifiers << v.typeName();
QDataStream ds;
ds << v;
ds >> str;
descriptions << str;
str.clear();
}
for(int i = 0; i < descriptions.count(); ++i) {
QString output;
if (!d->receiver_header.isEmpty())
output += (d->receiver_header.data()) +" ";
output += (d->receiver_header.data()) + " ";
output += identifiers.at(i) + ": " + descriptions.at(i);
if (!d->receiver_level.isEmpty()) {
QString level = d->receiver_level.data();
if (level == "trace")
dtkTrace() << output;
dtkTrace(FR_INRIA_DTK_COMPOSER_LOGGER) << output;
else if (level == "debug")
dtkDebug() << output;
dtkDebug(FR_INRIA_DTK_COMPOSER_LOGGER) << output;
else if (level == "info")
dtkInfo() << output;
dtkInfo(FR_INRIA_DTK_COMPOSER_LOGGER) << output;
else if (level == "warn")
dtkWarn() << output;
dtkWarning(FR_INRIA_DTK_COMPOSER_LOGGER) << output;
else if (level == "error")
dtkError() << output;
dtkError(FR_INRIA_DTK_COMPOSER_LOGGER) << output;
else if (level == "fatal")
dtkFatal() << output;
dtkCritical(FR_INRIA_DTK_COMPOSER_LOGGER) << output;
else
dtkInfo() << output;
dtkInfo(FR_INRIA_DTK_COMPOSER_LOGGER) << output;
} else {
dtkInfo() << output;
dtkInfo(FR_INRIA_DTK_COMPOSER_LOGGER) << output;
}
}
}
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - David Rey, Inria.
* Created: Mon Feb 27 14:28:20 2012 (+0100)
* Version: $Id$
* Last-Updated: 2013 Wed Jan 16 11:23:44 (+0100)
* Last-Updated: Wed Apr 3 10:17:09 2013 (+0200)
* By: Thibaud Kloczko
* Update #: 651
* Update #: 742
*/
/* Commentary:
......@@ -20,14 +20,53 @@
#include "dtkComposerNodeNumberOperator.h"
#include "dtkComposerTransmitterEmitter.h"
#include "dtkComposerTransmitterReceiver.h"
#include "dtkComposerTransmitterVariant.h"
#include <dtkLog/dtkLog.h>
#include <dtkMath/dtkMath.h>
#include <QtCore/qmath.h>
#include <math.h>
// ///////////////////////////////////////////////////////////////////
//
// ///////////////////////////////////////////////////////////////////
#if !defined(Q_WS_WIN)
#include <inttypes.h>
#else
#define int32_t qint32
#define int64_t qint64
#endif
bool dtkComposerAlmostEqualUlpsSimple(float A, float B, int32_t maxUlps)
{
if (A == B)
return true;
int32_t *AA = reinterpret_cast<int32_t*>(&A);
int32_t *BB = reinterpret_cast<int32_t*>(&B);
int32_t intDiff = abs(*AA) - abs(*BB);
if (intDiff <= maxUlps)
return true;
return false;
}
bool dtkComposerAlmostEqualUlpsSimple(double A, double B, int64_t maxUlps)
{
if (A == B)
return true;
int64_t *AA = reinterpret_cast<int64_t*>(&A);
int64_t *BB = reinterpret_cast<int64_t*>(&B);
int64_t intDiff = labs(*AA - *BB);
if (intDiff <= maxUlps)
return true;
return false;
}
// /////////////////////////////////////////////////////////////////
// dtkComposerNodeNumberOperatorUnary
// /////////////////////////////////////////////////////////////////
......@@ -35,10 +74,10 @@
class dtkComposerNodeNumberOperatorUnaryPrivate
{
public:
dtkComposerTransmitterVariant receiver;
dtkComposerTransmitterReceiverVariant receiver;
public:
dtkComposerTransmitterVariant emitter;
dtkComposerTransmitterEmitterVariant emitter;
public:
qlonglong value_i;
......@@ -47,13 +86,13 @@ public:
dtkComposerNodeNumberOperatorUnary::dtkComposerNodeNumberOperatorUnary(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeNumberOperatorUnaryPrivate)
{
QVector<const dtkComposerType*> variant_list;
variant_list << dtkComposerTypeInfo<qlonglong>::type() << dtkComposerTypeInfo<double>::type();
dtkComposerTransmitter::TypeList type_list;
type_list << QMetaType::LongLong << QMetaType::Double;
d->receiver.setDataTypes(variant_list);
d->receiver.setTypeList(type_list);
this->appendReceiver(&(d->receiver));
d->emitter.setDataTypes(variant_list);
d->emitter.setTypeList(type_list);
this->appendEmitter(&(d->emitter));
}
......@@ -71,11 +110,11 @@ dtkComposerNodeNumberOperatorUnary::~dtkComposerNodeNumberOperatorUnary(void)
class dtkComposerNodeNumberOperatorBinaryPrivate
{
public:
dtkComposerTransmitterVariant receiver_lhs;
dtkComposerTransmitterVariant receiver_rhs;
dtkComposerTransmitterReceiverVariant receiver_lhs;
dtkComposerTransmitterReceiverVariant receiver_rhs;
public:
dtkComposerTransmitterVariant emitter;
dtkComposerTransmitterEmitterVariant emitter;
public:
qlonglong value_i;
......@@ -84,16 +123,16 @@ public:
dtkComposerNodeNumberOperatorBinary::dtkComposerNodeNumberOperatorBinary(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeNumberOperatorBinaryPrivate)
{
QVector<const dtkComposerType*> variant_list;
variant_list << dtkComposerTypeInfo<qlonglong>::type() << dtkComposerTypeInfo<double>::type();
dtkComposerTransmitter::TypeList type_list;
type_list << QMetaType::LongLong << QMetaType::Double;
d->receiver_lhs.setDataTypes(variant_list);
d->receiver_lhs.setTypeList(type_list);
this->appendReceiver(&(d->receiver_lhs));
d->receiver_rhs.setDataTypes(variant_list);
d->receiver_rhs.setTypeList(type_list);
this->appendReceiver(&(d->receiver_rhs));
d->emitter.setDataTypes(variant_list);
d->emitter.setTypeList(type_list);
this->appendEmitter(&(d->emitter));
}
......@@ -111,8 +150,8 @@ dtkComposerNodeNumberOperatorBinary::~dtkComposerNodeNumberOperatorBinary(void)
class dtkComposerNodeNumberComparatorPrivate
{
public:
dtkComposerTransmitterVariant receiver_lhs;
dtkComposerTransmitterVariant receiver_rhs;
dtkComposerTransmitterReceiverVariant receiver_lhs;
dtkComposerTransmitterReceiverVariant receiver_rhs;
public:
dtkComposerTransmitterEmitter<bool> emitter;
......@@ -120,13 +159,13 @@ public:
dtkComposerNodeNumberComparator::dtkComposerNodeNumberComparator(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeNumberComparatorPrivate)
{
QVector<const dtkComposerType*> variant_list;
variant_list << dtkComposerTypeInfo<qlonglong>::type() << dtkComposerTypeInfo<double>::type();
dtkComposerTransmitter::TypeList type_list;
type_list << QMetaType::LongLong << QMetaType::Double;
d->receiver_lhs.setDataTypes(variant_list);
d->receiver_lhs.setTypeList(type_list);
this->appendReceiver(&(d->receiver_lhs));
d->receiver_rhs.setDataTypes(variant_list);
d->receiver_rhs.setTypeList(type_list);
this->appendReceiver(&(d->receiver_rhs));
this->appendEmitter(&(d->emitter));
......@@ -146,9 +185,9 @@ dtkComposerNodeNumberComparator::~dtkComposerNodeNumberComparator(void)
class dtkComposerNodeNumberAlmosteqPrivate
{
public:
dtkComposerTransmitterVariant receiver_lhs;
dtkComposerTransmitterVariant receiver_rhs;
dtkComposerTransmitterVariant receiver_eps;
dtkComposerTransmitterReceiverVariant receiver_lhs;
dtkComposerTransmitterReceiverVariant receiver_rhs;
dtkComposerTransmitterReceiverVariant receiver_eps;
public:
dtkComposerTransmitterEmitter<bool> emitter;
......@@ -159,16 +198,16 @@ public:
dtkComposerNodeNumberAlmosteq::dtkComposerNodeNumberAlmosteq(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeNumberAlmosteqPrivate)
{
QVector<const dtkComposerType*> variant_list;
variant_list << dtkComposerTypeInfo<qlonglong>::type() << dtkComposerTypeInfo<double>::type();
dtkComposerTransmitter::TypeList type_list;
type_list << QMetaType::LongLong << QMetaType::Double;
d->receiver_lhs.setDataTypes(variant_list);
d->receiver_lhs.setTypeList(type_list);
this->appendReceiver(&(d->receiver_lhs));
d->receiver_rhs.setDataTypes(variant_list);
d->receiver_rhs.setTypeList(type_list);
this->appendReceiver(&(d->receiver_rhs));
d->receiver_eps.setDataTypes(variant_list);
d->receiver_eps.setTypeList(type_list);
this->appendReceiver(&(d->receiver_eps));
d->value = false;
......@@ -184,14 +223,17 @@ dtkComposerNodeNumberAlmosteq::~dtkComposerNodeNumberAlmosteq(void)
void dtkComposerNodeNumberAlmosteq::run(void)
{
dtkComposerVariant lhs_var = d->receiver_lhs.variant();
dtkComposerVariant rhs_var = d->receiver_rhs.variant();
QVariant lhs_var = d->receiver_lhs.variant();
QVariant rhs_var = d->receiver_rhs.variant();
if (lhs_var.userType() == QMetaType::LongLong && rhs_var.userType() == QMetaType::LongLong) {
d->value = ( lhs_var.value<qlonglong>() == rhs_var.value<qlonglong>() );
if (lhs_var.userType() == QMetaType::Double || rhs_var.userType() == QMetaType::Double) {
d->value = dtkComposerAlmostEqualUlpsSimple(lhs_var.value<double>(), rhs_var.value<double>(), d->receiver_eps.data<double>());
} else if (lhs_var.userType() == QMetaType::Float || rhs_var.userType() == QMetaType::Float) {
d->value = dtkComposerAlmostEqualUlpsSimple(lhs_var.value<float>(), rhs_var.value<float>(), d->receiver_eps.data<float>());
} else {
d->value = dtkAlmostEqualUlpsSimple(lhs_var.value<double>(), rhs_var.value<double>(), d->receiver_eps.data<double>());
d->value = ( lhs_var.value<qlonglong>() == rhs_var.value<qlonglong>() );
}
d->emitter.setData(d->value);
......@@ -204,9 +246,9 @@ void dtkComposerNodeNumberAlmosteq::run(void)
class dtkComposerNodeNumberNotalmosteqPrivate
{
public:
dtkComposerTransmitterVariant receiver_lhs;
dtkComposerTransmitterVariant receiver_rhs;
dtkComposerTransmitterVariant receiver_eps;
dtkComposerTransmitterReceiverVariant receiver_lhs;
dtkComposerTransmitterReceiverVariant receiver_rhs;
dtkComposerTransmitterReceiverVariant receiver_eps;
public:
dtkComposerTransmitterEmitter<bool> emitter;
......@@ -217,16 +259,16 @@ public:
dtkComposerNodeNumberNotalmosteq::dtkComposerNodeNumberNotalmosteq(void) : dtkComposerNodeLeaf(), d(new dtkComposerNodeNumberNotalmosteqPrivate)
{
QVector<const dtkComposerType*> variant_list;
variant_list << dtkComposerTypeInfo<qlonglong>::type() << dtkComposerTypeInfo<double>::type();
dtkComposerTransmitter::TypeList type_list;
type_list << QMetaType::LongLong << QMetaType::Double;
d->receiver_lhs.setDataTypes(variant_list);
d->receiver_lhs.setTypeList(type_list);
this->appendReceiver(&(d->receiver_lhs));
d->receiver_rhs.setDataTypes(variant_list);
d->receiver_rhs.setTypeList(type_list);
this->appendReceiver(&(d->receiver_rhs));
d->receiver_eps.setDataTypes(variant_list);
d->receiver_eps.setTypeList(type_list);
this->appendReceiver(&(d->receiver_eps));
d->value = false;
......@@ -242,14 +284,17 @@ dtkComposerNodeNumberNotalmosteq::~dtkComposerNodeNumberNotalmosteq(void)
void dtkComposerNodeNumberNotalmosteq::run(void)
{
dtkComposerVariant lhs_var = d->receiver_lhs.variant();
dtkComposerVariant rhs_var = d->receiver_rhs.variant();
QVariant lhs_var = d->receiver_lhs.variant();
QVariant rhs_var = d->receiver_rhs.variant();
if (lhs_var.userType() == QMetaType::LongLong && rhs_var.userType() == QMetaType::LongLong) {
d->value = ( lhs_var.value<qlonglong>() != rhs_var.value<qlonglong>() );
if (lhs_var.userType() == QMetaType::Double || rhs_var.userType() == QMetaType::Double) {
d->value = !(dtkComposerAlmostEqualUlpsSimple(lhs_var.value<double>(), rhs_var.value<double>(), d->receiver_eps.data<double>()));
} else if (lhs_var.userType() == QMetaType::Float || rhs_var.userType() == QMetaType::Float) {
d->value = !(dtkComposerAlmostEqualUlpsSimple(lhs_var.value<float>(), rhs_var.value<float>(), d->receiver_eps.data<float>()));
} else {
d->value = !(dtkAlmostEqualUlpsSimple(lhs_var.value<double>(), rhs_var.value<double>(), d->receiver_eps.data<double>()));
d->value = ( lhs_var.value<qlonglong>() != rhs_var.value<qlonglong>() );
}
d->emitter.setData(d->value);
......@@ -261,13 +306,13 @@ void dtkComposerNodeNumberNotalmosteq::run(void)
void dtkComposerNodeNumberOperatorUnaryIncr::run(void)
{
dtkComposerVariant var = d->receiver.variant();
QVariant var = d->receiver.variant();