1 // Copyright (C) 2006-2019 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __OUTPUTPORT_HXX__
21 #define __OUTPUTPORT_HXX__
23 #include "YACSlibEngineExport.hxx"
24 #include "OutPort.hxx"
25 #include "DataFlowPort.hxx"
26 #include "ConversionException.hxx"
40 class CollectorSwOutputPort;
42 class YACSLIBENGINE_EXPORT OutputPort : public DataFlowPort, public OutPort
44 friend class CollectorSwOutputPort; // for conect
45 friend class ElementaryNode; // for disconnect...
46 friend class OptimizerLoop; // for interceptors
47 friend class InputPort;
48 friend class Runtime; // for port creation
49 friend class ForLoop; // for port creation
51 virtual ~OutputPort();
52 std::set<InPort *> edSetInPort() const;
53 bool isAlreadyLinkedWith(InPort *withp) const;
54 bool isAlreadyInSet(InputPort *inputPort) const;
55 bool isConnected() const;
56 std::string getNameOfTypeOfCurrentInstance() const;
57 int removeInPort(InPort *inPort, bool forward) throw(Exception);
58 virtual bool edAddInputPort(InputPort *phyPort) throw(Exception);
59 virtual bool edAddInPropertyPort(InPropertyPort *phyPort) throw(Exception);
60 virtual int edRemoveInputPort(InputPort *inputPort, bool forward) throw(Exception);
61 bool addInPort(InPort *inPort) throw(Exception);
62 void edRemoveAllLinksLinkedWithMe() throw(Exception);//entry point for forward port deletion
63 virtual void exInit();
64 virtual void checkBasicConsistency() const throw(Exception);
65 virtual OutputPort *clone(Node *newHelder) const = 0;
66 virtual std::string dump();
68 virtual void put(const void *data) throw(ConversionException);
69 virtual std::string typeName() {return "YACS__ENGINE__OutputPort";}
72 OutputPort(const OutputPort& other, Node *newHelder);
73 OutputPort(const std::string& name, Node *node, TypeCode* type);
75 const std::set<InputPort *>& getSetOfPhyLinks() const;
77 std::set<InputPort *> _setOfInputPort;//Key is for physical Data link
79 static const char NAME[];