Salome HOME
Correction of bug for HPContainers shared by different scripts.
[modules/yacs.git] / src / engine / DataFlowPort.cxx
index 6e749ff79bcea7c23d2e43d268c14ec940f6b571..d50953c841df0d198cf25ecef765f6bcd0c4d826 100644 (file)
@@ -1,3 +1,22 @@
+// 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 "DataFlowPort.hxx"
 
 using namespace YACS::ENGINE;
@@ -22,7 +41,23 @@ string DataFlowPort::getNameOfTypeOfCurrentInstance() const
   return NAME;
 }
 
-bool DataFlowPort::isDifferentTypeOf(const DataPort *other) const
+//! Gives a string representation of the data, for user interfaces.
+/*! Implemented in derived classes, depending on runtime, to provide
+ *  the data representation for user interfaces. 
+ *  Typical use, a Python string representation that can be used in
+ *  edition or restitution.
+ */
+std::string DataFlowPort::valToStr()
+{
+  return "no display conversion available";
+}
+
+//! Allows to set data from a string representation used in user interface.
+/*! Implemented in derived classes, depending on runtime, to set the data
+ *  from its user interface representation. 
+ *  Typical use, a Python string representation that can be used in
+ *  edition or restitution.
+ */
+void DataFlowPort::valFromStr(std::string valstr)
 {
-  return (dynamic_cast<const DataFlowPort *>(other))==0;
 }