Salome HOME
79ba829ae50e18b52bfafe83e78ca95b5b4712ef
[modules/yacs.git] / src / engine / DataFlowPort.cxx
1 // Copyright (C) 2006-2021  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #include "DataFlowPort.hxx"
21
22 using namespace YACS::ENGINE;
23 using namespace std;
24
25 const char DataFlowPort::NAME[]="DataFlowPort";
26
27 DataFlowPort::DataFlowPort(const DataFlowPort& other, Node *newHelder):DataPort(other,newHelder),Port(other,newHelder)
28 {
29 }
30
31 DataFlowPort::DataFlowPort(const std::string& name, Node *node, TypeCode* type):DataPort(name,node,type),Port(node)
32 {
33 }
34
35 DataFlowPort::~DataFlowPort()
36 {
37 }
38
39 string DataFlowPort::getNameOfTypeOfCurrentInstance() const
40 {
41   return NAME;
42 }
43
44 //! Gives a string representation of the data, for user interfaces.
45 /*! Implemented in derived classes, depending on runtime, to provide
46  *  the data representation for user interfaces. 
47  *  Typical use, a Python string representation that can be used in
48  *  edition or restitution.
49  */
50 std::string DataFlowPort::valToStr()
51 {
52   return "no display conversion available";
53 }
54
55 //! Allows to set data from a string representation used in user interface.
56 /*! Implemented in derived classes, depending on runtime, to set the data
57  *  from its user interface representation. 
58  *  Typical use, a Python string representation that can be used in
59  *  edition or restitution.
60  */
61 void DataFlowPort::valFromStr(std::string valstr)
62 {
63 }