X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FVisitorSaveSchema.cxx;h=0aca927cdaae158ddf69fd71ef73cb6cdbacf6a1;hb=c9208a8ef7f32a620d9650908588320ff159a167;hp=8e31150a559d093562d96fe967100178503cbcc1;hpb=c81be9b5e74b26e207bd6efd0ccf68418ac536a3;p=modules%2Fyacs.git diff --git a/src/engine/VisitorSaveSchema.cxx b/src/engine/VisitorSaveSchema.cxx index 8e31150a5..0aca927cd 100644 --- a/src/engine/VisitorSaveSchema.cxx +++ b/src/engine/VisitorSaveSchema.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2006-2012 CEA/DEN, EDF R&D +// Copyright (C) 2006-2019 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,6 +34,7 @@ #include "Switch.hxx" #include "InputPort.hxx" #include "TypeCode.hxx" +#include "HomogeneousPoolContainer.hxx" #include "ComponentInstance.hxx" #include "InputDataStreamPort.hxx" #include "OutputDataStreamPort.hxx" @@ -133,6 +134,7 @@ void VisitorSaveSchema::visitForEachLoop(ForEachLoop *node) _out << " state=\"disabled\""; if (!nbranch->isEmpty()) _out << " nbranch=\"" << nbranch->getIntValue() << "\""; + _out << " loopWeight=\"" << node->getWeight()->getSimpleLoopWeight() << "\""; if (node->edGetSamplePort()) _out << " type=\"" << node->edGetSamplePort()->edGetType()->name() << "\""; _out << ">" << endl; @@ -158,6 +160,7 @@ void VisitorSaveSchema::visitOptimizerLoop(OptimizerLoop *node) _out << " state=\"disabled\""; if (!nbranch->isEmpty()) _out << " nbranch=\"" << nbranch->getIntValue() << "\""; + _out << " loopWeight=\"" << node->getWeight()->getSimpleLoopWeight() << "\""; _out << " lib=\"" << node->getAlgLib() << "\""; _out << " entry=\"" << node->getSymbol() << "\""; _out << ">" << endl; @@ -221,10 +224,13 @@ void VisitorSaveSchema::visitInlineNode(InlineNode *node) DEBTRACE("START visitInlineNode " << _root->getChildName(node)); beginCase(node); int depth = depthNode(node); - if(node->getExecutionMode()=="local") + if(node->getExecutionMode()==InlineNode::LOCAL_STR) _out << indent(depth) << "getName() << "\""; else - _out << indent(depth) << "getName() << "\""; + { + _out << indent(depth) << "getName() << "\""; + _out << " elementaryWeight=\"" << node->getWeight()->getElementaryWeight() << "\""; + } if (node->getState() == YACS::DISABLED) _out << " state=\"disabled\">" << endl; else @@ -244,7 +250,7 @@ void VisitorSaveSchema::visitInlineNode(InlineNode *node) writeOutputPorts(node); writeOutputDataStreamPorts(node); - if(node->getExecutionMode()=="local") + if(node->getExecutionMode()==InlineNode::LOCAL_STR) _out << indent(depth) << "" << endl; else _out << indent(depth) << "" << endl; @@ -258,10 +264,13 @@ void VisitorSaveSchema::visitInlineFuncNode(InlineFuncNode *node) DEBTRACE("START visitInlineFuncNode " << _root->getChildName(node)); beginCase(node); int depth = depthNode(node); - if(node->getExecutionMode()=="local") + if(node->getExecutionMode()==InlineNode::LOCAL_STR) _out << indent(depth) << "getName() << "\""; else - _out << indent(depth) << "getName() << "\""; + { + _out << indent(depth) << "getName() << "\""; + _out << " elementaryWeight=\"" << node->getWeight()->getElementaryWeight() << "\""; + } if (node->getState() == YACS::DISABLED) _out << " state=\"disabled\">" << endl; else @@ -283,7 +292,7 @@ void VisitorSaveSchema::visitInlineFuncNode(InlineFuncNode *node) writeOutputPorts(node); writeOutputDataStreamPorts(node); - if(node->getExecutionMode()=="local") + if(node->getExecutionMode()==InlineNode::LOCAL_STR) _out << indent(depth) << "" << endl; else _out << indent(depth) << "" << endl; @@ -699,11 +708,25 @@ void VisitorSaveSchema::writeContainers(Proc *proc) { string name = it->first; _out << indent(depth) << "" << endl; + _out << indent(depth+1) << "second->getKind() << "\"/>" << endl; + _out << indent(depth+1) << "second->isAttachedOnCloning() << "\"/>" << endl; map properties = (it->second)->getProperties(); map::iterator itm; for(itm = properties.begin(); itm != properties.end(); ++itm) - _out << indent(depth+1) << "" << endl; + { + if((*itm).first==Container::KIND_ENTRY) + continue; + if((*itm).first==Container::AOC_ENTRY) + continue; + if((*itm).first!=HomogeneousPoolContainer::INITIALIZE_SCRIPT_KEY) + { + _out << indent(depth+1) << "" << endl; + } + else + { + _out << indent(depth+1) << "" << endl; + } + } _out << indent(depth) << "" << endl; } } @@ -782,8 +805,8 @@ void VisitorSaveSchema::writeControls(ComposedNode *node) for (list::iterator ic = setOfChildren.begin(); ic != setOfChildren.end(); ++ic) { // --- Control links from direct descendant to nodes inside the bloc - set setOfInGates = (*ic)->getOutGate()->edSetInGate(); - for (set::iterator ig = setOfInGates.begin(); ig != setOfInGates.end(); ++ig) + list setOfInGates = (*ic)->getOutGate()->edSetInGate(); + for (list::iterator ig = setOfInGates.begin(); ig != setOfInGates.end(); ++ig) { Node *to = (*ig)->getNode(); if (node->isInMyDescendance(to)) @@ -1067,11 +1090,6 @@ void VisitorSaveSchema::writeParametersNode(ComposedNode *proc, Node *node) { int depth = 1; list setOfInputPort = node->getLocalInputPorts(); - if (ForEachLoop* foreach = dynamic_cast(node)) - { - DEBTRACE("writeParametersNode foreach"); - setOfInputPort.push_back( foreach->edGetSeqOfSamplesPort()); - } list::iterator iter; for(iter = setOfInputPort.begin(); iter != setOfInputPort.end(); ++iter) {