1 // Copyright (C) 2006-2008 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.
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
19 #ifndef __OUTPUTPORT_HXX__
20 #define __OUTPUTPORT_HXX__
22 #include "OutPort.hxx"
23 #include "DataFlowPort.hxx"
24 #include "ConversionException.hxx"
37 class CollectorSwOutputPort;
39 class OutputPort : public DataFlowPort, public OutPort
41 friend class CollectorSwOutputPort; // for conect
42 friend class ElementaryNode; // for disconnect...
43 friend class OptimizerLoop; // for interceptors
44 friend class InputPort;
45 friend class Runtime; // for port creation
47 virtual ~OutputPort();
48 std::set<InPort *> edSetInPort() const;
49 bool isAlreadyLinkedWith(InPort *with) const;
50 bool isAlreadyInSet(InputPort *inputPort) const;
51 std::string getNameOfTypeOfCurrentInstance() const;
52 int removeInPort(InPort *inPort, bool forward) throw(Exception);
53 virtual bool edAddInputPort(InputPort *phyPort) throw(Exception);
54 virtual int edRemoveInputPort(InputPort *inputPort, bool forward) throw(Exception);
55 bool addInPort(InPort *inPort) throw(Exception);
56 void edRemoveAllLinksLinkedWithMe() throw(Exception);//entry point for forward port deletion
57 virtual void exInit();
58 virtual void checkBasicConsistency() const throw(Exception);
59 virtual OutputPort *clone(Node *newHelder) const = 0;
60 virtual std::string dump();
62 virtual void put(const void *data) throw(ConversionException);
63 virtual std::string typeName() {return "YACS__ENGINE__OutputPort";}
66 OutputPort(const OutputPort& other, Node *newHelder);
67 OutputPort(const std::string& name, Node *node, TypeCode* type);
69 const std::set<InputPort *>& getSetOfPhyLinks() const;
71 std::set<InputPort *> _setOfInputPort;//Key is for physical Data link
73 static const char NAME[];