Commit 17afe9bf authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

remove useless SetConditions statement

parent 934483d9
......@@ -4,9 +4,9 @@
## Copyright (C) 2008 - Julien Wintz, Inria.
## Created: Fri Sep 4 10:11:02 2009 (+0200)
## Version: $Id$
## Last-Updated: lun. mars 26 14:37:41 2012 (+0200)
## Last-Updated: mer. mars 28 13:57:56 2012 (+0200)
## By: Nicolas Niclausse
## Update #: 455
## Update #: 456
######################################################################
##
### Commentary:
......@@ -38,7 +38,6 @@ set(${PROJECT_NAME}_HEADERS
dtkComposerGraphNode.h
dtkComposerGraphNodeLeaf.h
dtkComposerGraphNodeSelectBranch.h
dtkComposerGraphNodeSetConditions.h
dtkComposerGraphNodeSetInputs.h
dtkComposerGraphNodeSetOutputs.h
dtkComposerGraphNodeSetVariables.h
......@@ -128,7 +127,6 @@ set(${PROJECT_NAME}_SOURCES
dtkComposerGraphNodeEnd.cpp
dtkComposerGraphNodeLeaf.cpp
dtkComposerGraphNodeSelectBranch.cpp
dtkComposerGraphNodeSetConditions.cpp
dtkComposerGraphNodeSetInputs.cpp
dtkComposerGraphNodeSetOutputs.cpp
dtkComposerGraphNodeSetVariables.cpp
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Thu Feb 9 14:43:33 2012 (+0100)
* Version: $Id$
* Last-Updated: mer. mars 28 13:34:16 2012 (+0200)
* Last-Updated: mer. mars 28 13:59:50 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 1896
* Update #: 1898
*/
/* Commentary:
......@@ -25,7 +25,6 @@
#include "dtkComposerGraphNodeEnd.h"
#include "dtkComposerGraphNodeLeaf.h"
#include "dtkComposerGraphNodeSelectBranch.h"
#include "dtkComposerGraphNodeSetConditions.h"
#include "dtkComposerGraphNodeSetInputs.h"
#include "dtkComposerGraphNodeSetOutputs.h"
#include "dtkComposerGraphNodeSetVariables.h"
......@@ -224,7 +223,6 @@ void dtkComposerGraph::addNode(dtkComposerSceneNode *node)
end = new dtkComposerGraphNodeEnd(wrapee,"End Control");
dtkComposerGraphNode *inputs = new dtkComposerGraphNodeSetInputs(wrapee);
dtkComposerGraphNode *outputs = new dtkComposerGraphNodeSetOutputs(wrapee);
dtkComposerGraphNode *set_conds = new dtkComposerGraphNodeSetConditions(wrapee);
dtkComposerGraphNode *select = new dtkComposerGraphNodeSelectBranch(wrapee);
d->addNode(node, begin, d->begin(node->parent()));
......@@ -232,7 +230,6 @@ void dtkComposerGraph::addNode(dtkComposerSceneNode *node)
d->addNode(node, outputs, begin);
d->addNode(node, end, d->begin(node->parent()));
d->addNode(node, select, begin);
d->addNode(node,set_conds, begin);
if (dynamic_cast<dtkComposerNodeControlFor *>(wrapee)) {
dtkComposerGraphNode *vars = new dtkComposerGraphNodeSetVariables(wrapee);
......@@ -245,8 +242,7 @@ void dtkComposerGraph::addNode(dtkComposerSceneNode *node)
int cond = 0; int main = 1; int incr = 2;
d->addDummyEdge( begin, inputs, node);
d->addDummyEdge( inputs, d->begin(blocks[cond]), node);
d->addDummyEdge( d->end(blocks[cond]), set_conds, node);
d->addDummyEdge(set_conds, select, node);
d->addDummyEdge( d->end(blocks[cond]), select, node);
d->addDummyEdge( select, d->begin(blocks[main]), node);
d->addDummyEdge( select, end, node, 1);
d->addDummyEdge(d->end(blocks[main]), outputs, node);
......@@ -265,13 +261,12 @@ void dtkComposerGraph::addNode(dtkComposerSceneNode *node)
int body = 0;
d->addDummyEdge( begin, inputs, node);
d->addDummyEdge( inputs, set_conds, node);
d->addDummyEdge(set_conds, select, node);
d->addDummyEdge( inputs, select, node);
d->addDummyEdge( select, d->begin(blocks[body]), node);
d->addDummyEdge( select, end, node, 1);
d->addDummyEdge( d->end(blocks[body]), outputs, node);
d->addDummyEdge(outputs, vars, node);
d->addDummyEdge( vars, set_conds, node);
d->addDummyEdge( vars, select, node);
vars->setEndLoop();
} else if (dynamic_cast<dtkComposerNodeControlWhile *>(wrapee)) {
......@@ -282,8 +277,7 @@ void dtkComposerGraph::addNode(dtkComposerSceneNode *node)
int cond_block = 0; int body_block = 1;
d->addDummyEdge( begin, inputs, node);
d->addDummyEdge( inputs, d->begin(blocks[cond_block]), node);
d->addDummyEdge( d->end(blocks[cond_block]), set_conds, node);
d->addDummyEdge(set_conds, select, node);
d->addDummyEdge( d->end(blocks[cond_block]), select, node);
d->addDummyEdge( select, d->begin(blocks[body_block]), node);
d->addDummyEdge( select, end, node, 1);
d->addDummyEdge(d->end(blocks[body_block]), outputs, node);
......@@ -300,8 +294,7 @@ void dtkComposerGraph::addNode(dtkComposerSceneNode *node)
d->addDummyEdge( inputs, d->begin(blocks[body_block]), node);
d->addDummyEdge( d->end(blocks[body_block]), outputs, node);
d->addDummyEdge( outputs, d->begin(blocks[cond_block]), node);
d->addDummyEdge( d->end(blocks[cond_block]), set_conds, node);
d->addDummyEdge( set_conds, select, node);
d->addDummyEdge( d->end(blocks[cond_block]), select, node);
d->addDummyEdge( select, d->begin(blocks[body_block]), node);
d->addDummyEdge( select, end, node, 1);
select->setEndLoop();
......@@ -314,8 +307,7 @@ void dtkComposerGraph::addNode(dtkComposerSceneNode *node)
this->addNode(block);
int then_block = 0; int else_block = 1;
d->addDummyEdge( begin, set_conds, node);
d->addDummyEdge(set_conds, select, node);
d->addDummyEdge( begin, select, node);
d->addDummyEdge( select, inputs, node);
d->addDummyEdge( select, inputs_else, node, 1);
d->addDummyEdge( inputs, d->begin(blocks[then_block]), node);
......
/* @(#)dtkComposerGraphNodeSetConditions.cpp ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2012 - Nicolas Niclausse, Inria.
* Created: 2012/02/14 13:59:57
* Version: $Id$
* Last-Updated: ven. mars 2 18:42:41 2012 (+0100)
* By: Nicolas Niclausse
* Update #: 53
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include "dtkComposerGraphNodeSetConditions.h"
#include "dtkComposerNode.h"
#include "dtkComposerNodeControl.h"
class dtkComposerGraphNodeSetConditionsPrivate
{
public:
dtkComposerNodeControl *composer_node;
};
dtkComposerGraphNodeSetConditions::dtkComposerGraphNodeSetConditions(dtkComposerNode *cnode, const QString& title) : dtkComposerGraphNode(),d(new dtkComposerGraphNodeSetConditionsPrivate)
{
d->composer_node = dynamic_cast<dtkComposerNodeControl *>(cnode);
this->setTitle(title);
}
dtkComposerGraphNode::Kind dtkComposerGraphNodeSetConditions::kind(void)
{
return dtkComposerGraphNode::SetConditions;
}
dtkComposerNode *dtkComposerGraphNodeSetConditions::wrapee(void)
{
return d->composer_node;
}
void dtkComposerGraphNodeSetConditions::eval(void)
{
if (d->composer_node == NULL)
return;
d->composer_node->setConditions();
this->setStatus(dtkComposerGraphNode::Done);
}
/* @(#)dtkComposerGraphNodeSetConditions.h ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2012 - Nicolas Niclausse, Inria.
* Created: 2012/02/14 13:55:56
* Version: $Id$
* Last-Updated: ven. mars 2 18:37:35 2012 (+0100)
* By: Nicolas Niclausse
* Update #: 33
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef DTKCOMPOSERGRAPHNODESETCONDITIONS_H
#define DTKCOMPOSERGRAPHNODESETCONDITIONS_H
#include "dtkComposerGraphNode.h"
class dtkComposerNode;
class dtkComposerGraphNodeSetConditionsPrivate;
// /////////////////////////////////////////////////////////////////
// dtkComposerGraphNodeSetConditions
// /////////////////////////////////////////////////////////////////
class dtkComposerGraphNodeSetConditions : public dtkComposerGraphNode
{
public:
dtkComposerGraphNodeSetConditions(dtkComposerNode *node, const QString& title = "Set Conditions");
public:
void eval(void);
public:
dtkComposerGraphNode::Kind kind(void);
public:
dtkComposerNode *wrapee(void);
private:
dtkComposerGraphNodeSetConditionsPrivate *d;
};
#endif /* DTKCOMPOSERGRAPHNODESETCONDITIONS_H */
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - David Rey, Inria.
* Created: Tue Feb 14 15:40:50 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Mar 21 09:20:13 2012 (+0100)
* By: tkloczko
* Update #: 30
* Last-Updated: mer. mars 28 13:58:30 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 31
*/
/* Commentary:
......@@ -86,11 +86,6 @@ void dtkComposerNodeControl::setInputs(void)
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
}
void dtkComposerNodeControl::setConditions(void)
{
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
}
void dtkComposerNodeControl::setOutputs(void)
{
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - David Rey, Inria.
* Created: Tue Feb 14 15:40:03 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Mar 21 09:18:51 2012 (+0100)
* By: tkloczko
* Update #: 41
* Last-Updated: mer. mars 28 13:58:44 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 42
*/
/* Commentary:
......@@ -57,7 +57,6 @@ public:
public:
virtual void setInputs(void);
virtual void setConditions(void);
virtual void setOutputs(void);
virtual void setVariables(void);
virtual int selectBranch(void);
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Sat Feb 25 00:02:50 2012 (+0100)
* Version: $Id$
* Last-Updated: Wed Mar 21 15:15:50 2012 (+0100)
* By: tkloczko
* Update #: 46
* Last-Updated: mer. mars 28 13:58:59 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 47
*/
/* Commentary:
......@@ -112,15 +112,10 @@ void dtkComposerNodeControlDoWhile::setInputs(void)
foreach(dtkComposerTransmitterVariant *v, this->inputTwins()) {
v->setTwinned(false);
v->setData(v->data());
v->setTwinned(true);
v->setTwinned(true);
}
}
void dtkComposerNodeControlDoWhile::setConditions(void)
{
}
void dtkComposerNodeControlDoWhile::setOutputs(void)
{
foreach(dtkComposerTransmitterVariant *v, this->outputTwins())
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Fri Feb 24 16:52:08 2012 (+0100)
* Version: $Id$
* Last-Updated: Sat Feb 25 01:07:47 2012 (+0100)
* By: Julien Wintz
* Update #: 8
* Last-Updated: mer. mars 28 13:58:50 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 9
*/
/* Commentary:
......@@ -39,7 +39,6 @@ public:
public:
void setInputs(void);
void setConditions(void);
void setOutputs(void);
void setVariables(void);
int selectBranch(void);
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Wed Feb 15 09:14:22 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Mar 22 16:05:42 2012 (+0100)
* By: tkloczko
* Update #: 115
* Last-Updated: mer. mars 28 13:59:10 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 116
*/
/* Commentary:
......@@ -153,10 +153,6 @@ void dtkComposerNodeControlFor::setInputs(void)
}
}
void dtkComposerNodeControlFor::setConditions(void)
{
}
void dtkComposerNodeControlFor::setOutputs(void)
{
for (int i = 1; i < this->outputTwins().count(); i++)
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Wed Feb 15 09:12:58 2012 (+0100)
* Version: $Id$
* Last-Updated: Sat Feb 25 00:05:11 2012 (+0100)
* By: Julien Wintz
* Update #: 17
* Last-Updated: mer. mars 28 13:59:31 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 18
*/
/* Commentary:
......@@ -39,7 +39,6 @@ public:
public:
void setInputs(void);
void setConditions(void);
void setOutputs(void);
void setVariables(void);
int selectBranch(void);
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2011 - Thibaud Kloczko, Inria.
* Created: Wed Feb 15 09:14:22 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Mar 22 16:30:53 2012 (+0100)
* By: tkloczko
* Update #: 87
* Last-Updated: mer. mars 28 13:59:19 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 88
*/
/* Commentary:
......@@ -97,11 +97,6 @@ void dtkComposerNodeControlForEach::setInputs(void)
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
}
void dtkComposerNodeControlForEach::setConditions(void)
{
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
}
void dtkComposerNodeControlForEach::setOutputs(void)
{
DTK_DEFAULT_IMPLEMENTATION_NO_MOC;
......
......@@ -4,9 +4,9 @@
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Fri Feb 24 16:52:08 2012 (+0100)
* Version: $Id$
* Last-Updated: lun. févr. 27 15:37:38 2012 (+0100)
* Last-Updated: mer. mars 28 13:59:25 2012 (+0200)
* By: Nicolas Niclausse
* Update #: 10
* Update #: 11
*/
/* Commentary:
......@@ -39,7 +39,6 @@ public:
public:
void setInputs(void);
void setConditions(void);
void setOutputs(void);
void setVariables(void);
int selectBranch(void);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment