X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fengine%2FDataFlowPort.cxx;h=d50953c841df0d198cf25ecef765f6bcd0c4d826;hb=dd11aac68042347f9af44dc2ad91206427161774;hp=6e749ff79bcea7c23d2e43d268c14ec940f6b571;hpb=a84e60a749da66dffb73297fa5082b70b9d62f7d;p=modules%2Fyacs.git diff --git a/src/engine/DataFlowPort.cxx b/src/engine/DataFlowPort.cxx index 6e749ff79..d50953c84 100644 --- a/src/engine/DataFlowPort.cxx +++ b/src/engine/DataFlowPort.cxx @@ -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(other))==0; }