Salome HOME
The DistributedPythonNode with func is OK with HPContainer.
[modules/yacs.git] / src / runtime / VisitorSaveSalomeSchema.cxx
index 8ad231d4f848b4e4d8a4f1fed5e5e8401c95ceb9..8bc1260183401589021bc8894036166128d85181 100644 (file)
@@ -1,11 +1,29 @@
+// Copyright (C) 2006-2014  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, 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
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
 
+#include "PresetPorts.hxx"
 #include "VisitorSaveSalomeSchema.hxx"
 #include "DataNode.hxx"
 #include "PresetNode.hxx"
 #include "OutNode.hxx"
 #include "StudyNodes.hxx"
 #include "ComposedNode.hxx"
-#include "PresetPorts.hxx"
 #include "StudyPorts.hxx"
 #include "TypeCode.hxx"
 
@@ -42,8 +60,8 @@ void VisitorSaveSalomeSchema::visitPresetNode(DataNode *node)
     _out << " state=\"disabled\">" << endl;
   else
     _out << ">" << endl;
-  writeProperties(node);
   writeDataNodeParameters(node);
+  writeProperties(node);
   _out << indent(depth) << "</datanode>" << endl;
   endCase(node);
   DEBTRACE("END visitPresetNode " << _root->getChildName(node));
@@ -61,8 +79,8 @@ void VisitorSaveSalomeSchema::visitOutNode(DataNode *node)
     _out << " state=\"disabled\">" << endl;
   else
     _out << ">" << endl;
-  writeProperties(node);
   writeOutNodeParameters(node);
+  writeProperties(node);
   _out << indent(depth) << "</outnode>" << endl;
   endCase(node);
   DEBTRACE("END visitOutNode " << _root->getChildName(node));
@@ -80,8 +98,8 @@ void VisitorSaveSalomeSchema::visitStudyInNode(DataNode *node)
     _out << " state=\"disabled\">" << endl;
   else
     _out << ">" << endl;
-  writeProperties(node);
   writeStudyInNodeParameters(node);
+  writeProperties(node);
   _out << indent(depth) << "</datanode>" << endl;
   endCase(node);
   DEBTRACE("END visitStudyInNode " << _root->getChildName(node));
@@ -99,8 +117,8 @@ void VisitorSaveSalomeSchema::visitStudyOutNode(DataNode *node)
     _out << " state=\"disabled\">" << endl;
   else
     _out << ">" << endl;
-  writeProperties(node);
   writeStudyOutNodeParameters(node);
+  writeProperties(node);
   _out << indent(depth) << "</outnode>" << endl;
   endCase(node);
   DEBTRACE("END visitStudyOutNode " << _root->getChildName(node));
@@ -115,7 +133,7 @@ void VisitorSaveSalomeSchema::writeDataNodeParameters(DataNode *node)
       _out << indent(depth) << "<parameter name=\"" << (*it)->getName() << "\" type=\"" 
            << (*it)->edGetType()->name() << "\">" << endl;
       OutputPresetPort *outp = dynamic_cast<OutputPresetPort*>(*it);
-      assert(outp);
+      YASSERT(outp);
       _out << indent(depth+1) << outp->getData();
       _out << indent(depth) << "</parameter>" << endl;
     }
@@ -130,7 +148,7 @@ void VisitorSaveSalomeSchema::writeStudyInNodeParameters(DataNode *node)
       _out << indent(depth) << "<parameter name=\"" << (*it)->getName() << "\" type=\"" 
            << (*it)->edGetType()->name() << "\" ref=\"";
       OutputStudyPort *outp = dynamic_cast<OutputStudyPort*>(*it);
-      assert(outp);
+      YASSERT(outp);
       _out << outp->getData() << "\"/>" << endl;
     }
 }
@@ -155,7 +173,7 @@ void VisitorSaveSalomeSchema::writeStudyOutNodeParameters(DataNode *node)
       _out << indent(depth) << "<parameter name=\"" << (*it)->getName() << "\" type=\"" 
            << (*it)->edGetType()->name() << "\" ref=\"";
       InputStudyPort *inp = dynamic_cast<InputStudyPort*>(*it);
-      assert(inp);
+      YASSERT(inp);
       _out << inp->getData() << "\"/>" << endl;
     }
 }